@@ -34,7 +34,18 @@ import {
3434 createJobMoveToDelayedFC ,
3535 createQueuePepUpFC ,
3636} from './mutation' ;
37- import { createOnJobWaitingFC } from './subscriptions' ;
37+ import {
38+ createOnJobActiveFC ,
39+ createOnJobCompletedFC ,
40+ createOnJobDelayedFC ,
41+ createOnJobFailedFC ,
42+ createOnJobProgressFC ,
43+ createOnJobRemovedFC ,
44+ createOnJobStalledFC ,
45+ createOnJobWaitingFC ,
46+ createOnQueuePausedFC ,
47+ createOnQueueResumedFC ,
48+ } from './subscriptions' ;
3849import { wrapMutationFC , wrapQueueArgs , wrapQueueSubsArgs , composeFC } from './helpers' ;
3950
4051interface ComposeBullResult {
@@ -87,11 +98,20 @@ export function composeBull(
8798 } ,
8899 } as ComposeBullResult ;
89100
90- if ( opts ?. redisEvents ) {
91- data . subscriptionFields = {
92- onJobWaiting : wrapSubscription ( createOnJobWaitingFC ) ,
93- } ;
94- }
101+ //if (opts?.redisEvents) {
102+ data . subscriptionFields = {
103+ onJobActive : wrapSubscription ( createOnJobActiveFC ) ,
104+ onJobCompleted : wrapSubscription ( createOnJobCompletedFC ) ,
105+ onJobDelayed : wrapSubscription ( createOnJobDelayedFC ) ,
106+ onJobFailed : wrapSubscription ( createOnJobFailedFC ) ,
107+ onJobProgress : wrapSubscription ( createOnJobProgressFC ) ,
108+ onJobRemoved : wrapSubscription ( createOnJobRemovedFC ) ,
109+ onJobStalled : wrapSubscription ( createOnJobStalledFC ) ,
110+ onJobWaiting : wrapSubscription ( createOnJobWaitingFC ) ,
111+ onQueuePaused : wrapSubscription ( createOnQueuePausedFC ) ,
112+ onQueueResumed : wrapSubscription ( createOnQueueResumedFC ) ,
113+ } ;
114+ //}
95115
96116 return data ;
97117}
0 commit comments