Add cron mechanism (#3318)

* Add cron to message queue interfaces

* Add command to launch cron job

* Add command to stop cron job

* Update clean inactive workspaces job

* Isolate cron mechanism

* Code review returns

* Remove useless object.assign

* Add MessageQueuCronJobData interface

* Rename cron job utils

* Fix typing
This commit is contained in:
martmull
2024-01-09 12:23:45 +01:00
committed by GitHub
parent ed06cc0310
commit 361446d79c
9 changed files with 119 additions and 11 deletions

View File

@ -2,6 +2,12 @@ export interface MessageQueueJob<T extends MessageQueueJobData> {
handle(data: T): Promise<void> | void;
}
export interface MessageQueueCronJobData<
T extends MessageQueueJobData | undefined,
> {
handle(data: T): Promise<void> | void;
}
export interface MessageQueueJobData {
[key: string]: any;
}