@mantajs/adapter-jobs-vercel-cron 0.2.0-beta.0
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/adapter.d.ts +22 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +154 -0
- package/dist/adapter.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/package.json +20 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IJobSchedulerPort, ILockingPort, ILoggerPort, JobExecution, JobResult, MantaApp } from '@mantajs/core';
|
|
2
|
+
export declare class VercelCronAdapter implements IJobSchedulerPort {
|
|
3
|
+
private _locking;
|
|
4
|
+
private _logger;
|
|
5
|
+
private _jobs;
|
|
6
|
+
private _executionCounts;
|
|
7
|
+
private _history;
|
|
8
|
+
private _app;
|
|
9
|
+
/** Set the app reference so job handlers receive the real app. */
|
|
10
|
+
setApp(app: MantaApp): void;
|
|
11
|
+
constructor(_locking: ILockingPort, _logger: ILoggerPort);
|
|
12
|
+
register(name: string, schedule: string, handler: (ctx: {
|
|
13
|
+
app: MantaApp;
|
|
14
|
+
}) => Promise<JobResult>, options?: Record<string, unknown>): void;
|
|
15
|
+
runJob(name: string): Promise<JobResult>;
|
|
16
|
+
getJobHistory(jobName: string, limit?: number): Promise<JobExecution[]>;
|
|
17
|
+
private _executeWithTimeout;
|
|
18
|
+
private _calculateBackoff;
|
|
19
|
+
private _persistExecution;
|
|
20
|
+
_reset(): void;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAcpH,qBAAa,iBAAkB,YAAW,iBAAiB;IAYvD,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,OAAO;IAZjB,OAAO,CAAC,KAAK,CAAqC;IAClD,OAAO,CAAC,gBAAgB,CAA4B;IACpD,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,IAAI,CAAwB;IAEpC,kEAAkE;IAClE,MAAM,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI;gBAKjB,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,WAAW;IAM9B,QAAQ,CACN,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,GAAG,EAAE;QAAE,GAAG,EAAE,QAAQ,CAAA;KAAE,KAAK,OAAO,CAAC,SAAS,CAAC,EACvD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,IAAI;IAID,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAuFxC,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;YAK/D,mBAAmB;IAuBjC,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,iBAAiB;IAWzB,MAAM;CAKP"}
|
package/dist/adapter.js
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
// SPEC-063 — VercelCronAdapter implements IJobSchedulerPort
|
|
2
|
+
// This is a registry-based adapter. Vercel Cron triggers jobs via HTTP.
|
|
3
|
+
// register() stores handlers locally, runJob() executes them with locking and persistence.
|
|
4
|
+
import { MantaError } from '@mantajs/core';
|
|
5
|
+
export class VercelCronAdapter {
|
|
6
|
+
_locking;
|
|
7
|
+
_logger;
|
|
8
|
+
_jobs = new Map();
|
|
9
|
+
_executionCounts = new Map();
|
|
10
|
+
_history = [];
|
|
11
|
+
_app = null;
|
|
12
|
+
/** Set the app reference so job handlers receive the real app. */
|
|
13
|
+
setApp(app) {
|
|
14
|
+
this._app = app;
|
|
15
|
+
}
|
|
16
|
+
constructor(_locking, _logger) {
|
|
17
|
+
this._locking = _locking;
|
|
18
|
+
this._logger = _logger;
|
|
19
|
+
if (!_locking)
|
|
20
|
+
throw new MantaError('INVALID_STATE', 'IJobSchedulerPort requires ILockingPort');
|
|
21
|
+
if (!_logger)
|
|
22
|
+
throw new MantaError('INVALID_STATE', 'IJobSchedulerPort requires ILoggerPort');
|
|
23
|
+
}
|
|
24
|
+
register(name, schedule, handler, options) {
|
|
25
|
+
this._jobs.set(name, { schedule, handler, options: options });
|
|
26
|
+
}
|
|
27
|
+
async runJob(name) {
|
|
28
|
+
const job = this._jobs.get(name);
|
|
29
|
+
if (!job)
|
|
30
|
+
throw new MantaError('NOT_FOUND', `Job "${name}" not registered`);
|
|
31
|
+
const started = new Date();
|
|
32
|
+
const startMs = Date.now();
|
|
33
|
+
try {
|
|
34
|
+
// Concurrency control (J-04)
|
|
35
|
+
if (job.options?.concurrency === 'forbid') {
|
|
36
|
+
const acquired = await this._locking.acquire([`job:${name}`], { expire: 60000 });
|
|
37
|
+
if (!acquired) {
|
|
38
|
+
const result = { status: 'skipped', duration_ms: Date.now() - startMs };
|
|
39
|
+
await this._persistExecution(name, started, result);
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// numberOfExecutions limit
|
|
44
|
+
if (job.options?.numberOfExecutions) {
|
|
45
|
+
const count = this._executionCounts.get(name) ?? 0;
|
|
46
|
+
if (count >= job.options.numberOfExecutions) {
|
|
47
|
+
const result = { status: 'skipped', duration_ms: Date.now() - startMs };
|
|
48
|
+
await this._persistExecution(name, started, result);
|
|
49
|
+
if (job.options?.concurrency === 'forbid') {
|
|
50
|
+
await this._locking.release([`job:${name}`]).catch(() => { });
|
|
51
|
+
}
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// Execute with retry support
|
|
56
|
+
let result;
|
|
57
|
+
const maxRetries = job.options?.retry?.maxRetries ?? 0;
|
|
58
|
+
let lastError;
|
|
59
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
60
|
+
try {
|
|
61
|
+
result = await this._executeWithTimeout(job, name);
|
|
62
|
+
this._executionCounts.set(name, (this._executionCounts.get(name) ?? 0) + 1);
|
|
63
|
+
await this._persistExecution(name, started, result);
|
|
64
|
+
if (job.options?.concurrency === 'forbid') {
|
|
65
|
+
await this._locking.release([`job:${name}`]);
|
|
66
|
+
}
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
lastError = error;
|
|
71
|
+
if (attempt < maxRetries) {
|
|
72
|
+
const delay = this._calculateBackoff(job.options?.retry, attempt);
|
|
73
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// All retries exhausted
|
|
78
|
+
const err = lastError instanceof Error ? lastError : new Error(String(lastError));
|
|
79
|
+
result = {
|
|
80
|
+
status: 'failure',
|
|
81
|
+
error: MantaError.is(lastError) ? lastError : new MantaError('UNEXPECTED_STATE', err.message),
|
|
82
|
+
duration_ms: Date.now() - startMs,
|
|
83
|
+
};
|
|
84
|
+
this._logger.error(`Job "${name}" failed after ${maxRetries + 1} attempts`, lastError);
|
|
85
|
+
await this._persistExecution(name, started, result);
|
|
86
|
+
if (job.options?.concurrency === 'forbid') {
|
|
87
|
+
await this._locking.release([`job:${name}`]).catch(() => { });
|
|
88
|
+
}
|
|
89
|
+
return result;
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
93
|
+
const result = {
|
|
94
|
+
status: 'failure',
|
|
95
|
+
error: MantaError.is(error) ? error : new MantaError('UNEXPECTED_STATE', err.message),
|
|
96
|
+
duration_ms: Date.now() - startMs,
|
|
97
|
+
};
|
|
98
|
+
this._logger.error(`Job "${name}" failed`, error);
|
|
99
|
+
await this._persistExecution(name, started, result);
|
|
100
|
+
if (job.options?.concurrency === 'forbid') {
|
|
101
|
+
await this._locking.release([`job:${name}`]).catch(() => { });
|
|
102
|
+
}
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
async getJobHistory(jobName, limit) {
|
|
107
|
+
const filtered = this._history.filter((h) => h.job_name === jobName);
|
|
108
|
+
return limit ? filtered.slice(-limit) : filtered;
|
|
109
|
+
}
|
|
110
|
+
async _executeWithTimeout(job, name) {
|
|
111
|
+
const timeoutMs = job.options?.timeout;
|
|
112
|
+
if (!timeoutMs || timeoutMs <= 0) {
|
|
113
|
+
return job.handler({ app: this._app });
|
|
114
|
+
}
|
|
115
|
+
const controller = new AbortController();
|
|
116
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
117
|
+
try {
|
|
118
|
+
return await Promise.race([
|
|
119
|
+
job.handler({ app: this._app }),
|
|
120
|
+
new Promise((_resolve, reject) => {
|
|
121
|
+
controller.signal.addEventListener('abort', () => {
|
|
122
|
+
reject(new MantaError('UNEXPECTED_STATE', `Job "${name}" exceeded timeout of ${timeoutMs}ms`));
|
|
123
|
+
});
|
|
124
|
+
}),
|
|
125
|
+
]);
|
|
126
|
+
}
|
|
127
|
+
finally {
|
|
128
|
+
clearTimeout(timer);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
_calculateBackoff(retry, attempt) {
|
|
132
|
+
const baseDelay = retry?.delay ?? 1000;
|
|
133
|
+
if (retry?.backoff === 'exponential') {
|
|
134
|
+
return baseDelay * 2 ** attempt;
|
|
135
|
+
}
|
|
136
|
+
return baseDelay;
|
|
137
|
+
}
|
|
138
|
+
_persistExecution(name, started, result) {
|
|
139
|
+
this._history.push({
|
|
140
|
+
job_name: name,
|
|
141
|
+
started_at: started,
|
|
142
|
+
finished_at: new Date(),
|
|
143
|
+
status: result.status,
|
|
144
|
+
error: result.error?.message,
|
|
145
|
+
attempt: 1,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
_reset() {
|
|
149
|
+
this._jobs.clear();
|
|
150
|
+
this._executionCounts.clear();
|
|
151
|
+
this._history = [];
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,wEAAwE;AACxE,2FAA2F;AAG3F,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAa1C,MAAM,OAAO,iBAAiB;IAYlB;IACA;IAZF,KAAK,GAAG,IAAI,GAAG,EAA2B,CAAA;IAC1C,gBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAA;IAC5C,QAAQ,GAAmB,EAAE,CAAA;IAC7B,IAAI,GAAoB,IAAI,CAAA;IAEpC,kEAAkE;IAClE,MAAM,CAAC,GAAa;QAClB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAA;IACjB,CAAC;IAED,YACU,QAAsB,EACtB,OAAoB;QADpB,aAAQ,GAAR,QAAQ,CAAc;QACtB,YAAO,GAAP,OAAO,CAAa;QAE5B,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,UAAU,CAAC,eAAe,EAAE,yCAAyC,CAAC,CAAA;QAC/F,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,UAAU,CAAC,eAAe,EAAE,wCAAwC,CAAC,CAAA;IAC/F,CAAC;IAED,QAAQ,CACN,IAAY,EACZ,QAAgB,EAChB,OAAuD,EACvD,OAAiC;QAEjC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAqC,EAAE,CAAC,CAAA;IAC7F,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAY;QACvB,MAA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O;YAC5B,OAAO,EAAE,CAAC;SACX,CAAC,CAAA;IACJ,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;QAClB,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAA;QAC7B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;IACpB,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mantajs/adapter-jobs-vercel-cron",
|
|
3
|
+
"version": "0.2.0-beta.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"peerDependencies": {
|
|
15
|
+
"@mantajs/core": "0.2.0-beta.0"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
]
|
|
20
|
+
}
|