add health server and metrics to db queue worker
This commit is contained in:
1 parent
fd536541d7
commit
b3d9c5b94c
3 files changed
+91
-5
No files matched your search
@@ -23,6 +23,7 @@ export class JobScheduler implements IJobScheduler {
|
||||
}
|
||||
|
||||
protected stopped = false;
|
||||
protected draining = false;
|
||||
protected ticking: Partial<Record<JobType, boolean>> = {}; // Whether a loop is mid tick
|
||||
protected tickFns = new Map<JobType, () => void>(); // Store tick fns so we can run them immediately on wake
|
||||
protected timers = new Map<JobType | "heartbeat", NodeJS.Timeout>();
|
||||
@@ -156,6 +157,7 @@ export class JobScheduler implements IJobScheduler {
|
||||
|
||||
drain = async () => {
|
||||
this.stopped = true;
|
||||
this.draining = true;
|
||||
};
|
||||
|
||||
shutdown = async () => {
|
||||
|
||||
Reference in new issue
Block a user