File tree 3 files changed +6
-7
lines changed
3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { ParentCommand } from '../enums' ;
2
- import { JobJson , SandboxedJob } from '../interfaces' ;
2
+ import { SandboxedJob } from '../interfaces' ;
3
+ import { JobJsonSandbox } from '../types' ;
3
4
import { errorToJSON } from '../utils' ;
4
5
5
6
enum ChildStatus {
@@ -61,7 +62,7 @@ export class ChildProcessor {
61
62
} ) ;
62
63
}
63
64
64
- public async start ( jobJson : JobJson , token ?: string ) : Promise < void > {
65
+ public async start ( jobJson : JobJsonSandbox , token ?: string ) : Promise < void > {
65
66
if ( this . status !== ChildStatus . Idle ) {
66
67
return this . send ( {
67
68
cmd : ParentCommand . Error ,
@@ -110,7 +111,7 @@ export class ChildProcessor {
110
111
* The wrapped job adds back some of those original functions.
111
112
*/
112
113
protected wrapJob (
113
- job : JobJson ,
114
+ job : JobJsonSandbox ,
114
115
send : ( msg : any ) => Promise < void > ,
115
116
) : SandboxedJob {
116
117
return {
Original file line number Diff line number Diff line change 8
8
JobJson ,
9
9
JobJsonRaw ,
10
10
MinimalJob ,
11
- MoveToDelayedOpts ,
12
11
MoveToWaitingChildrenOpts ,
13
12
ParentKeys ,
14
13
ParentOpts ,
Original file line number Diff line number Diff line change 1
- import { JobsOptions } from '../types' ;
2
- import { JobJson } from './job-json' ;
1
+ import { JobJsonSandbox , JobsOptions } from '../types' ;
3
2
4
3
/**
5
4
* @see {@link https://docs.bullmq.io/guide/workers/sandboxed-processors }
6
5
*/
7
6
export interface SandboxedJob < T = any , R = any >
8
- extends Omit < JobJson , 'data' | 'opts' | 'returnValue' > {
7
+ extends Omit < JobJsonSandbox , 'data' | 'opts' | 'returnValue' > {
9
8
data : T ;
10
9
opts : JobsOptions ;
11
10
moveToDelayed : ( timestamp : number , token ?: string ) => Promise < void > ;
You can’t perform that action at this time.
0 commit comments