@stacksjs/scheduler 0.75.520 → 0.75.522
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schedule.d.ts +34 -0
- package/dist/scheduler-claims.d.ts +1 -0
- package/package.json +14 -14
package/dist/schedule.d.ts
CHANGED
|
@@ -69,8 +69,32 @@ export type SchedulableActionName = keyof SchedulableActions extends never
|
|
|
69
69
|
: Extract<keyof SchedulableActions, string>;
|
|
70
70
|
export type Scheduler = typeof Schedule;
|
|
71
71
|
export declare class Schedule implements UntimedSchedule {
|
|
72
|
+
private static jobs;
|
|
73
|
+
private static scheduledKeys;
|
|
74
|
+
private cronPattern;
|
|
75
|
+
private intervalMs;
|
|
76
|
+
private timezone;
|
|
77
|
+
private task;
|
|
78
|
+
private static lockDir;
|
|
79
|
+
private static stateFile;
|
|
80
|
+
private static activeLocks;
|
|
81
|
+
private static inProcessRuns;
|
|
82
|
+
private shouldPreventOverlap;
|
|
83
|
+
private overlapExpiresAfterMinutes;
|
|
84
|
+
private shouldRunOnOneServer;
|
|
85
|
+
private shouldRunInBackground;
|
|
86
|
+
private outputPath;
|
|
87
|
+
private outputAppend;
|
|
88
|
+
private handlesOwnOutput;
|
|
89
|
+
private jobName;
|
|
90
|
+
private dispatchQueue;
|
|
91
|
+
private options;
|
|
72
92
|
constructor(task: (context?: any) => unknown);
|
|
73
93
|
get pattern(): string;
|
|
94
|
+
private cronFields;
|
|
95
|
+
private setTimeOfDay;
|
|
96
|
+
private setDays;
|
|
97
|
+
private releaseInterval;
|
|
74
98
|
everySecond(): TimedSchedule;
|
|
75
99
|
everyMinute(): TimedSchedule;
|
|
76
100
|
everyTwoMinutes(): TimedSchedule;
|
|
@@ -110,7 +134,17 @@ export declare class Schedule implements UntimedSchedule {
|
|
|
110
134
|
static setEnabled(name: string, enabled: boolean): void;
|
|
111
135
|
static isEnabled(name: string): boolean;
|
|
112
136
|
static isScheduled(name: string): boolean;
|
|
137
|
+
private static disabledJobs;
|
|
113
138
|
static listLocks(): string[];
|
|
139
|
+
private acquireLock;
|
|
140
|
+
private oneServerDb;
|
|
141
|
+
private claimSlot;
|
|
142
|
+
private releaseLock;
|
|
143
|
+
private wrapTask;
|
|
144
|
+
private getNextRunTime;
|
|
145
|
+
private zone;
|
|
146
|
+
private nextCronTime;
|
|
147
|
+
private start;
|
|
114
148
|
static job(name: SchedulableJobName): UntimedSchedule;
|
|
115
149
|
static action(name: SchedulableActionName): UntimedSchedule;
|
|
116
150
|
static command(cmd: string): UntimedSchedule;
|
|
@@ -12,3 +12,4 @@ export declare const SCHEDULER_CLAIMS_TABLE: 'scheduler_claims';
|
|
|
12
12
|
/** How long a claim row is kept before the winner of a later slot prunes it. */
|
|
13
13
|
export declare const SCHEDULER_CLAIM_RETENTION_MS: number;
|
|
14
14
|
declare type AdminDb = { unsafe: (sql: string) => Promise<unknown> }
|
|
15
|
+
export {};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/scheduler",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.522",
|
|
6
6
|
"description": "The Stacks scheduler.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -58,19 +58,19 @@
|
|
|
58
58
|
"prepublishOnly": "bun run build"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@stacksjs/action-runner": "0.75.
|
|
62
|
-
"@stacksjs/cli": "0.75.
|
|
63
|
-
"@stacksjs/config": "0.75.
|
|
64
|
-
"@stacksjs/cron": "0.75.
|
|
65
|
-
"@stacksjs/database": "0.75.
|
|
66
|
-
"@stacksjs/env": "0.75.
|
|
67
|
-
"@stacksjs/error-handling": "0.75.
|
|
68
|
-
"@stacksjs/logging": "0.75.
|
|
69
|
-
"@stacksjs/notifications": "0.75.
|
|
70
|
-
"@stacksjs/path": "0.75.
|
|
71
|
-
"@stacksjs/queue": "0.75.
|
|
72
|
-
"@stacksjs/storage": "0.75.
|
|
73
|
-
"@stacksjs/types": "0.75.
|
|
61
|
+
"@stacksjs/action-runner": "0.75.522",
|
|
62
|
+
"@stacksjs/cli": "0.75.522",
|
|
63
|
+
"@stacksjs/config": "0.75.522",
|
|
64
|
+
"@stacksjs/cron": "0.75.522",
|
|
65
|
+
"@stacksjs/database": "0.75.522",
|
|
66
|
+
"@stacksjs/env": "0.75.522",
|
|
67
|
+
"@stacksjs/error-handling": "0.75.522",
|
|
68
|
+
"@stacksjs/logging": "0.75.522",
|
|
69
|
+
"@stacksjs/notifications": "0.75.522",
|
|
70
|
+
"@stacksjs/path": "0.75.522",
|
|
71
|
+
"@stacksjs/queue": "0.75.522",
|
|
72
|
+
"@stacksjs/storage": "0.75.522",
|
|
73
|
+
"@stacksjs/types": "0.75.522"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"better-dx": "^0.2.24"
|