@webiny/api-scheduler-server 0.0.0-unstable.0d717d18dd → 0.0.0-unstable.a4f3e4ea8b
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/BreeSchedulerService.d.ts +4 -15
- package/BreeSchedulerService.js +15 -18
- package/BreeSchedulerService.js.map +1 -1
- package/context.d.ts +3 -0
- package/context.js +44 -0
- package/context.js.map +1 -0
- package/index.d.ts +1 -2
- package/index.js +1 -1
- package/package.json +8 -6
|
@@ -3,35 +3,24 @@ import type { Logger } from "@webiny/api-core/features/logger/abstractions.js";
|
|
|
3
3
|
export interface IPendingAction {
|
|
4
4
|
id: string;
|
|
5
5
|
namespace: string;
|
|
6
|
-
tenant: string;
|
|
7
6
|
scheduledFor: Date;
|
|
8
7
|
}
|
|
9
8
|
export interface IBreeSchedulerServiceParams {
|
|
10
9
|
logger: Logger.Interface;
|
|
11
|
-
onTrigger: (id: string, namespace: string
|
|
10
|
+
onTrigger: (id: string, namespace: string) => Promise<void>;
|
|
12
11
|
}
|
|
13
|
-
/**
|
|
14
|
-
* One-shot bree job per scheduled action — mirrors EventBridge behaviour. This is a single-process,
|
|
15
|
-
* long-lived root SINGLETON (started once at boot): it holds the live timers for ALL tenants, so each
|
|
16
|
-
* job records its own tenant and `onTrigger` is fired with it (the trigger runs outside any request,
|
|
17
|
-
* so the tenant can't be read from a request context).
|
|
18
|
-
*/
|
|
19
12
|
export declare class BreeSchedulerService implements SchedulerService.Interface {
|
|
20
13
|
private readonly bree;
|
|
21
|
-
private readonly
|
|
14
|
+
private readonly namespaces;
|
|
22
15
|
private readonly logger;
|
|
23
16
|
private readonly onTrigger;
|
|
24
17
|
constructor(params: IBreeSchedulerServiceParams);
|
|
25
|
-
start(): Promise<void>;
|
|
18
|
+
start(pendingActions?: IPendingAction[]): Promise<void>;
|
|
26
19
|
stop(): Promise<void>;
|
|
27
20
|
create(params: ISchedulerServiceCreateParams): Promise<void>;
|
|
28
21
|
update(params: ISchedulerServiceUpdateParams): Promise<void>;
|
|
29
22
|
delete(params: SchedulerService.DeleteParams): Promise<void>;
|
|
30
23
|
exists(params: SchedulerService.ExistsParams): Promise<boolean>;
|
|
31
|
-
|
|
32
|
-
* (Re)arm timers for a batch of persisted pending actions — called at boot (per tenant) to restore
|
|
33
|
-
* schedules after a restart. Overdue actions fire immediately.
|
|
34
|
-
*/
|
|
35
|
-
recover(pendingActions: IPendingAction[]): Promise<void>;
|
|
24
|
+
private recover;
|
|
36
25
|
private safeRemove;
|
|
37
26
|
}
|
package/BreeSchedulerService.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import bree from "bree";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
2
3
|
import { fileURLToPath } from "node:url";
|
|
3
4
|
import { WebinyError } from "@webiny/error";
|
|
4
|
-
const
|
|
5
|
+
const jobsDir = join(dirname(fileURLToPath(import.meta.url)), "jobs");
|
|
6
|
+
const workerPath = join(jobsDir, "pollWorker.js");
|
|
5
7
|
class BreeSchedulerService {
|
|
6
8
|
constructor(params){
|
|
7
|
-
this.
|
|
9
|
+
this.namespaces = new Map();
|
|
8
10
|
this.logger = params.logger;
|
|
9
11
|
this.onTrigger = params.onTrigger;
|
|
10
12
|
this.bree = new bree({
|
|
@@ -12,15 +14,16 @@ class BreeSchedulerService {
|
|
|
12
14
|
jobs: [],
|
|
13
15
|
logger: false,
|
|
14
16
|
workerMessageHandler: async ({ name })=>{
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
17
|
-
this.
|
|
18
|
-
await this.onTrigger(name,
|
|
17
|
+
const namespace = this.namespaces.get(name);
|
|
18
|
+
if (!namespace) return;
|
|
19
|
+
this.namespaces.delete(name);
|
|
20
|
+
await this.onTrigger(name, namespace);
|
|
19
21
|
}
|
|
20
22
|
});
|
|
21
23
|
}
|
|
22
|
-
async start() {
|
|
24
|
+
async start(pendingActions) {
|
|
23
25
|
await this.bree.start();
|
|
26
|
+
if (pendingActions) await this.recover(pendingActions);
|
|
24
27
|
}
|
|
25
28
|
async stop() {
|
|
26
29
|
await this.bree.stop();
|
|
@@ -37,10 +40,7 @@ class BreeSchedulerService {
|
|
|
37
40
|
tenant
|
|
38
41
|
});
|
|
39
42
|
if (exists) return this.update(params);
|
|
40
|
-
this.
|
|
41
|
-
namespace,
|
|
42
|
-
tenant
|
|
43
|
-
});
|
|
43
|
+
this.namespaces.set(id, namespace);
|
|
44
44
|
await this.bree.add({
|
|
45
45
|
name: id,
|
|
46
46
|
date: scheduleFor,
|
|
@@ -65,19 +65,16 @@ class BreeSchedulerService {
|
|
|
65
65
|
}
|
|
66
66
|
async exists(params) {
|
|
67
67
|
const { id } = params;
|
|
68
|
-
return this.
|
|
68
|
+
return this.namespaces.has(id);
|
|
69
69
|
}
|
|
70
70
|
async recover(pendingActions) {
|
|
71
71
|
const now = new Date();
|
|
72
72
|
for (const action of pendingActions){
|
|
73
73
|
if (action.scheduledFor <= now) {
|
|
74
|
-
await this.onTrigger(action.id, action.namespace
|
|
74
|
+
await this.onTrigger(action.id, action.namespace);
|
|
75
75
|
continue;
|
|
76
76
|
}
|
|
77
|
-
this.
|
|
78
|
-
namespace: action.namespace,
|
|
79
|
-
tenant: action.tenant
|
|
80
|
-
});
|
|
77
|
+
this.namespaces.set(action.id, action.namespace);
|
|
81
78
|
await this.bree.add({
|
|
82
79
|
name: action.id,
|
|
83
80
|
date: action.scheduledFor,
|
|
@@ -87,7 +84,7 @@ class BreeSchedulerService {
|
|
|
87
84
|
}
|
|
88
85
|
}
|
|
89
86
|
async safeRemove(id) {
|
|
90
|
-
this.
|
|
87
|
+
this.namespaces.delete(id);
|
|
91
88
|
try {
|
|
92
89
|
await this.bree.stop(id);
|
|
93
90
|
} catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreeSchedulerService.js","sources":["../src/BreeSchedulerService.ts"],"sourcesContent":["import Bree from \"bree\";\nimport { fileURLToPath } from \"node:url\";\nimport { WebinyError } from \"@webiny/error\";\nimport {\n type ISchedulerServiceCreateParams,\n type ISchedulerServiceUpdateParams,\n SchedulerService\n} from \"@webiny/api-scheduler/shared/abstractions.js\";\nimport type { Logger } from \"@webiny/api-core/features/logger/abstractions.js\";\n\
|
|
1
|
+
{"version":3,"file":"BreeSchedulerService.js","sources":["../src/BreeSchedulerService.ts"],"sourcesContent":["import Bree from \"bree\";\nimport { dirname, join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { WebinyError } from \"@webiny/error\";\nimport {\n type ISchedulerServiceCreateParams,\n type ISchedulerServiceUpdateParams,\n SchedulerService\n} from \"@webiny/api-scheduler/shared/abstractions.js\";\nimport type { Logger } from \"@webiny/api-core/features/logger/abstractions.js\";\n\nconst jobsDir = join(dirname(fileURLToPath(import.meta.url)), \"jobs\");\nconst workerPath = join(jobsDir, \"pollWorker.js\");\n\nexport interface IPendingAction {\n id: string;\n namespace: string;\n scheduledFor: Date;\n}\n\nexport interface IBreeSchedulerServiceParams {\n logger: Logger.Interface;\n onTrigger: (id: string, namespace: string) => Promise<void>;\n}\n\n/* One-shot bree job per scheduled action — mirrors EventBridge behavior. */\nexport class BreeSchedulerService implements SchedulerService.Interface {\n private readonly bree;\n private readonly namespaces = new Map<string, string>();\n private readonly logger;\n private readonly onTrigger;\n\n public constructor(params: IBreeSchedulerServiceParams) {\n this.logger = params.logger;\n this.onTrigger = params.onTrigger;\n\n this.bree = new Bree({\n root: false,\n jobs: [],\n logger: false,\n workerMessageHandler: async ({ name }) => {\n const namespace = this.namespaces.get(name);\n if (!namespace) {\n return;\n }\n\n this.namespaces.delete(name);\n await this.onTrigger(name, namespace);\n }\n });\n }\n\n public async start(pendingActions?: IPendingAction[]): Promise<void> {\n await this.bree.start();\n\n if (pendingActions) {\n await this.recover(pendingActions);\n }\n }\n\n public async stop(): Promise<void> {\n await this.bree.stop();\n }\n\n public async create(params: ISchedulerServiceCreateParams): Promise<void> {\n const { id, namespace, scheduleFor, tenant } = params;\n\n if (scheduleFor <= new Date()) {\n throw new WebinyError(\n `Cannot create a schedule for \"${id}\" with date in the past`,\n \"INVALID_SCHEDULE_DATE\",\n { scheduleFor, id }\n );\n }\n\n const exists = await this.exists({\n id,\n namespace,\n tenant\n });\n if (exists) {\n return this.update(params);\n }\n\n this.namespaces.set(id, namespace);\n\n await this.bree.add({\n name: id,\n date: scheduleFor,\n path: workerPath\n });\n\n await this.bree.start(id);\n }\n\n public async update(params: ISchedulerServiceUpdateParams): Promise<void> {\n const { id, scheduleFor } = params;\n\n if (scheduleFor <= new Date()) {\n throw new WebinyError(\n `Cannot update an existing schedule for \"${id}\" with date in the past`,\n \"INVALID_SCHEDULE_DATE\",\n { scheduleFor, id }\n );\n }\n\n await this.safeRemove(id);\n await this.create(params);\n }\n\n public async delete(params: SchedulerService.DeleteParams): Promise<void> {\n const { id } = params;\n const exists = await this.exists(params);\n if (!exists) {\n throw new WebinyError(`Cannot delete schedule \"${id}\" because it does not exist.`);\n }\n\n await this.safeRemove(id);\n }\n\n public async exists(params: SchedulerService.ExistsParams): Promise<boolean> {\n const { id } = params;\n return this.namespaces.has(id);\n }\n\n private async recover(pendingActions: IPendingAction[]): Promise<void> {\n const now = new Date();\n\n for (const action of pendingActions) {\n if (action.scheduledFor <= now) {\n /* Overdue — execute immediately. */\n await this.onTrigger(action.id, action.namespace);\n continue;\n }\n\n this.namespaces.set(action.id, action.namespace);\n\n await this.bree.add({\n name: action.id,\n date: action.scheduledFor,\n path: workerPath\n });\n\n await this.bree.start(action.id);\n }\n }\n\n private async safeRemove(id: string): Promise<void> {\n this.namespaces.delete(id);\n\n try {\n await this.bree.stop(id);\n } catch {\n this.logger.debug(`Could not stop bree job \"${id}\" — it may have already fired.`);\n }\n\n try {\n await this.bree.remove(id);\n } catch {\n this.logger.debug(\n `Could not remove bree job \"${id}\" — it may have already been removed.`\n );\n }\n }\n}\n"],"names":["jobsDir","join","dirname","fileURLToPath","workerPath","BreeSchedulerService","params","Map","Bree","name","namespace","pendingActions","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I,CAAC,IAAI,CAAC,KAAK,CAACe,OAAO,EAAE;QACnC;IACJ;IAEA,MAAc,WAAWP,EAAU,EAAiB;QAChD,IAAI,CAAC,UAAU,CAAC,MAAM,CAACA;QAEvB,IAAI;YACA,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAACA;QACzB,EAAE,OAAM;YACJ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,yBAAyB,EAAEA,GAAG,8BAA8B,CAAC;QACpF;QAEA,IAAI;YACA,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAACA;QAC3B,EAAE,OAAM;YACJ,IAAI,CAAC,MAAM,CAAC,KAAK,CACb,CAAC,2BAA2B,EAAEA,GAAG,qCAAqC,CAAC;QAE/E;IACJ;AACJ"}
|
package/context.d.ts
ADDED
package/context.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SchedulerService } from "@webiny/api-scheduler/shared/abstractions.js";
|
|
2
|
+
import { ExecuteScheduledActionUseCase } from "@webiny/api-scheduler/features/ExecuteScheduledAction/index.js";
|
|
3
|
+
import { ListScheduledActionsUseCase } from "@webiny/api-scheduler/features/ListScheduledActions/index.js";
|
|
4
|
+
import { Logger } from "@webiny/api-core/features/logger/abstractions.js";
|
|
5
|
+
import { TenantContext } from "@webiny/api-core/features/tenancy/TenantContext/index.js";
|
|
6
|
+
import { BreeSchedulerService } from "./BreeSchedulerService.js";
|
|
7
|
+
import { ContextPlugin } from "@webiny/api";
|
|
8
|
+
const registerSchedulerServerExtension = ()=>{
|
|
9
|
+
const plugin = new ContextPlugin(async (context)=>{
|
|
10
|
+
const tenantContext = context.container.resolve(TenantContext);
|
|
11
|
+
const tenant = tenantContext.getTenant();
|
|
12
|
+
if (!tenant) return;
|
|
13
|
+
const logger = context.container.resolve(Logger);
|
|
14
|
+
const executeScheduledAction = context.container.resolve(ExecuteScheduledActionUseCase);
|
|
15
|
+
const service = new BreeSchedulerService({
|
|
16
|
+
logger,
|
|
17
|
+
onTrigger: async (id, namespace)=>{
|
|
18
|
+
const result = await executeScheduledAction.execute({
|
|
19
|
+
id,
|
|
20
|
+
namespace,
|
|
21
|
+
tenant: tenant.id
|
|
22
|
+
});
|
|
23
|
+
if (result.isFail()) logger.error(`Scheduled action "${id}" execution failed: ${result.error.message}`);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
context.container.registerInstance(SchedulerService, service);
|
|
27
|
+
const listScheduledActions = context.container.resolve(ListScheduledActionsUseCase);
|
|
28
|
+
const listResult = await listScheduledActions.execute({
|
|
29
|
+
where: {},
|
|
30
|
+
limit: 1000
|
|
31
|
+
});
|
|
32
|
+
const pendingActions = listResult.isOk() ? listResult.value.items.map((action)=>({
|
|
33
|
+
id: action.id,
|
|
34
|
+
namespace: action.namespace,
|
|
35
|
+
scheduledFor: action.scheduledFor
|
|
36
|
+
})) : void 0;
|
|
37
|
+
await service.start(pendingActions);
|
|
38
|
+
});
|
|
39
|
+
plugin.name = "scheduler.server.extension";
|
|
40
|
+
return plugin;
|
|
41
|
+
};
|
|
42
|
+
export { registerSchedulerServerExtension };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=context.js.map
|
package/context.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../src/context.ts"],"sourcesContent":["import type { CmsContext } from \"@webiny/api-headless-cms/types/index.js\";\nimport { SchedulerService } from \"@webiny/api-scheduler/shared/abstractions.js\";\nimport { ExecuteScheduledActionUseCase } from \"@webiny/api-scheduler/features/ExecuteScheduledAction/index.js\";\nimport { ListScheduledActionsUseCase } from \"@webiny/api-scheduler/features/ListScheduledActions/index.js\";\nimport { Logger } from \"@webiny/api-core/features/logger/abstractions.js\";\nimport { TenantContext } from \"@webiny/api-core/features/tenancy/TenantContext/index.js\";\nimport { BreeSchedulerService } from \"~/BreeSchedulerService.js\";\nimport { ContextPlugin } from \"@webiny/api\";\n\nexport const registerSchedulerServerExtension = () => {\n const plugin = new ContextPlugin<CmsContext>(async context => {\n const tenantContext = context.container.resolve(TenantContext);\n\n const tenant = tenantContext.getTenant();\n if (!tenant) {\n return;\n }\n\n const logger = context.container.resolve(Logger);\n const executeScheduledAction = context.container.resolve(ExecuteScheduledActionUseCase);\n\n const service = new BreeSchedulerService({\n logger,\n onTrigger: async (id, namespace) => {\n const result = await executeScheduledAction.execute({\n id,\n namespace,\n tenant: tenant.id\n });\n\n if (result.isFail()) {\n logger.error(\n `Scheduled action \"${id}\" execution failed: ${result.error.message}`\n );\n }\n }\n });\n\n context.container.registerInstance(SchedulerService, service);\n\n const listScheduledActions = context.container.resolve(ListScheduledActionsUseCase);\n const listResult = await listScheduledActions.execute({\n where: {},\n limit: 1000\n });\n\n const pendingActions = listResult.isOk()\n ? listResult.value.items.map(action => ({\n id: action.id,\n namespace: action.namespace,\n scheduledFor: action.scheduledFor\n }))\n : undefined;\n\n await service.start(pendingActions);\n });\n\n plugin.name = \"scheduler.server.extension\";\n\n return plugin;\n};\n"],"names":["registerSchedulerServerExtension","plugin","ContextPlugin","context","tenantContext","TenantContext","tenant","logger","Logger","executeScheduledAction","ExecuteScheduledActionUseCase","service","BreeSchedulerService","id","namespace","result","SchedulerService","listScheduledActions","ListScheduledActionsUseCase","listResult","pendingActions","action","undefined"],"mappings":";;;;;;;AASO,MAAMA,mCAAmC;IAC5C,MAAMC,SAAS,IAAIC,cAA0B,OAAMC;QAC/C,MAAMC,gBAAgBD,QAAQ,SAAS,CAAC,OAAO,CAACE;QAEhD,MAAMC,SAASF,cAAc,SAAS;QACtC,IAAI,CAACE,QACD;QAGJ,MAAMC,SAASJ,QAAQ,SAAS,CAAC,OAAO,CAACK;QACzC,MAAMC,yBAAyBN,QAAQ,SAAS,CAAC,OAAO,CAACO;QAEzD,MAAMC,UAAU,IAAIC,qBAAqB;YACrCL;YACA,WAAW,OAAOM,IAAIC;gBAClB,MAAMC,SAAS,MAAMN,uBAAuB,OAAO,CAAC;oBAChDI;oBACAC;oBACA,QAAQR,OAAO,EAAE;gBACrB;gBAEA,IAAIS,OAAO,MAAM,IACbR,OAAO,KAAK,CACR,CAAC,kBAAkB,EAAEM,GAAG,oBAAoB,EAAEE,OAAO,KAAK,CAAC,OAAO,EAAE;YAGhF;QACJ;QAEAZ,QAAQ,SAAS,CAAC,gBAAgB,CAACa,kBAAkBL;QAErD,MAAMM,uBAAuBd,QAAQ,SAAS,CAAC,OAAO,CAACe;QACvD,MAAMC,aAAa,MAAMF,qBAAqB,OAAO,CAAC;YAClD,OAAO,CAAC;YACR,OAAO;QACX;QAEA,MAAMG,iBAAiBD,WAAW,IAAI,KAChCA,WAAW,KAAK,CAAC,KAAK,CAAC,GAAG,CAACE,CAAAA,SAAW;gBAClC,IAAIA,OAAO,EAAE;gBACb,WAAWA,OAAO,SAAS;gBAC3B,cAAcA,OAAO,YAAY;YACrC,MACAC;QAEN,MAAMX,QAAQ,KAAK,CAACS;IACxB;IAEAnB,OAAO,IAAI,GAAG;IAEd,OAAOA;AACX"}
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type { IPendingAction, IBreeSchedulerServiceParams } from "./BreeSchedulerService.js";
|
|
1
|
+
export { registerSchedulerServerExtension } from "./context.js";
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { registerSchedulerServerExtension } from "./context.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-scheduler-server",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.a4f3e4ea8b",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -18,14 +18,16 @@
|
|
|
18
18
|
"description": "Server-side cron-based implementation for the Webiny action scheduler.",
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@webiny/api
|
|
22
|
-
"@webiny/api-
|
|
23
|
-
"@webiny/
|
|
21
|
+
"@webiny/api": "0.0.0-unstable.a4f3e4ea8b",
|
|
22
|
+
"@webiny/api-core": "0.0.0-unstable.a4f3e4ea8b",
|
|
23
|
+
"@webiny/api-headless-cms": "0.0.0-unstable.a4f3e4ea8b",
|
|
24
|
+
"@webiny/api-scheduler": "0.0.0-unstable.a4f3e4ea8b",
|
|
25
|
+
"@webiny/error": "0.0.0-unstable.a4f3e4ea8b",
|
|
24
26
|
"bree": "9.2.9"
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
|
-
"@webiny/build-tools": "0.0.0-unstable.
|
|
28
|
-
"@webiny/project-utils": "0.0.0-unstable.
|
|
29
|
+
"@webiny/build-tools": "0.0.0-unstable.a4f3e4ea8b",
|
|
30
|
+
"@webiny/project-utils": "0.0.0-unstable.a4f3e4ea8b",
|
|
29
31
|
"typescript": "7.0.2",
|
|
30
32
|
"vitest": "4.1.10"
|
|
31
33
|
},
|