mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-10 16:12:50 +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 })
|
||||
taskType: number;
|
||||
|
||||
@Column({ type: 'datetime', nullable: true })
|
||||
@Column({ nullable: true })
|
||||
lastExecuteTime: Date;
|
||||
|
||||
@Column({ type: 'datetime', nullable: true })
|
||||
@Column({ nullable: true })
|
||||
lockExpireTime: Date;
|
||||
}
|
||||
|
||||
@ -165,14 +165,16 @@ export class TaskLocalService extends BaseService {
|
||||
this.cronJobs.delete(params.jobId);
|
||||
this.coolEventManager.emit('onLocalTaskStop', params.jobId);
|
||||
}
|
||||
await this.utils.sleep(1000);
|
||||
this.createCronJob(params);
|
||||
setTimeout(async () => {
|
||||
this.createCronJob(params);
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
if (params.status === 1) {
|
||||
await this.utils.sleep(1000);
|
||||
await this.updateNextRunTime(params.jobId);
|
||||
setTimeout(async () => {
|
||||
await this.updateNextRunTime(params.jobId);
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user