File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
apps/webapp/app/presenters/v3 Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 1
- import { Prisma , TaskRunStatus } from "@trigger.dev/database" ;
1
+ import { Prisma , TaskRunStatus , TaskTriggerSource } from "@trigger.dev/database" ;
2
2
import parse from "parse-duration" ;
3
3
import { Direction } from "~/components/runs/RunStatuses" ;
4
4
import { FINISHED_STATUSES } from "~/components/runs/v3/TaskRunStatus" ;
@@ -94,12 +94,16 @@ export class RunListPresenter extends BasePresenter {
94
94
} ) ;
95
95
96
96
//get all possible tasks
97
- const possibleTasksAsync = this . _replica . backgroundWorkerTask . findMany ( {
98
- distinct : [ "slug" ] ,
99
- where : {
100
- projectId : project . id ,
101
- } ,
102
- } ) ;
97
+ const possibleTasksAsync = this . _replica . $queryRaw <
98
+ {
99
+ slug : string ;
100
+ triggerSource : TaskTriggerSource
101
+ } [ ]
102
+ > `
103
+ SELECT DISTINCT(slug), "triggerSource"
104
+ FROM ${ sqlDatabaseSchema } ."BackgroundWorkerTask"
105
+ WHERE "projectId" = ${ project . id }
106
+ ORDER BY slug ASC;` ;
103
107
104
108
//get possible bulk actions
105
109
const bulkActionsAsync = this . _replica . bulkActionGroup . findMany ( {
You can’t perform that action at this time.
0 commit comments