mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-11 16:52:49 +00:00
fix pgsql
This commit is contained in:
parent
eeccddae35
commit
23002bffd7
@ -54,9 +54,9 @@ export class TaskInfoEntity extends BaseEntity {
|
|||||||
@Column({ comment: '状态 0-cron 1-时间间隔', default: 0 })
|
@Column({ comment: '状态 0-cron 1-时间间隔', default: 0 })
|
||||||
taskType: number;
|
taskType: number;
|
||||||
|
|
||||||
@Column({ type: 'datetime', nullable: true })
|
@Column({ nullable: true })
|
||||||
lastExecuteTime: Date;
|
lastExecuteTime: Date;
|
||||||
|
|
||||||
@Column({ type: 'datetime', nullable: true })
|
@Column({ nullable: true })
|
||||||
lockExpireTime: Date;
|
lockExpireTime: Date;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -165,14 +165,16 @@ export class TaskLocalService extends BaseService {
|
|||||||
this.cronJobs.delete(params.jobId);
|
this.cronJobs.delete(params.jobId);
|
||||||
this.coolEventManager.emit('onLocalTaskStop', params.jobId);
|
this.coolEventManager.emit('onLocalTaskStop', params.jobId);
|
||||||
}
|
}
|
||||||
await this.utils.sleep(1000);
|
setTimeout(async () => {
|
||||||
this.createCronJob(params);
|
this.createCronJob(params);
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (params.status === 1) {
|
if (params.status === 1) {
|
||||||
await this.utils.sleep(1000);
|
setTimeout(async () => {
|
||||||
await this.updateNextRunTime(params.jobId);
|
await this.updateNextRunTime(params.jobId);
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user