File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ import {
3
3
Job ,
4
4
makeWorkerUtils ,
5
5
run ,
6
- runMigrations ,
7
6
RunnerOptions ,
8
7
runOnce ,
9
8
TaskSpec ,
9
+ WorkerUtils ,
10
10
} from 'graphile-worker' ;
11
11
12
12
@Injectable ( )
@@ -41,6 +41,10 @@ export class GraphileWorkerService {
41
41
await runOnce ( this . options ) ;
42
42
}
43
43
44
+ getWorkerUtils ( ) : Promise < WorkerUtils > {
45
+ return makeWorkerUtils ( this . options ) ;
46
+ }
47
+
44
48
async addJob (
45
49
identifier : string ,
46
50
payload ?: unknown ,
@@ -53,7 +57,7 @@ export class GraphileWorkerService {
53
57
async addJobs (
54
58
jobs : Array < { identifier : string ; payload ?: unknown ; spec ?: TaskSpec } > ,
55
59
) : Promise < Job [ ] > {
56
- const workerUtils = await makeWorkerUtils ( this . options ) ;
60
+ const workerUtils = await this . getWorkerUtils ( ) ;
57
61
const createdJobs : Job [ ] = [ ] ;
58
62
59
63
try {
@@ -74,7 +78,6 @@ export class GraphileWorkerService {
74
78
return ;
75
79
}
76
80
77
- await runMigrations ( this . options ) ;
78
81
this . logger . debug ( 'Run migrations' ) ;
79
82
this . isMigrationDone = true ;
80
83
}
You can’t perform that action at this time.
0 commit comments