File tree 2 files changed +4
-4
lines changed
libraries/nestjs-libraries/src
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -80,12 +80,12 @@ export class BullMqClient extends ClientProxy {
80
80
async dispatchEvent ( packet : ReadPacket < any > ) : Promise < any > {
81
81
console . log ( 'event to dispatch: ' , packet ) ;
82
82
const queue = this . getQueue ( packet . pattern ) ;
83
- if ( packet . data . options . cron ) {
84
- const { cron , immediately } = packet . data . options ;
83
+ if ( packet . data . options . every ) {
84
+ const { every , immediately } = packet . data . options ;
85
85
const id = packet . data . id ?? v4 ( ) ;
86
86
await queue . upsertJobScheduler (
87
87
id ,
88
- { pattern : cron , ...( immediately ? { immediately } : { } ) } ,
88
+ { every , ...( immediately ? { immediately } : { } ) } ,
89
89
{
90
90
name : id ,
91
91
data : packet . data ,
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ export class AutopostService {
101
101
return this . _workerServiceProducer . emit ( 'cron' , {
102
102
id,
103
103
options : {
104
- cron : '1 * * * *' ,
104
+ every : 3600000 ,
105
105
immediately : true ,
106
106
} ,
107
107
payload : {
You can’t perform that action at this time.
0 commit comments