nestjs-temporal-core 2.0.3 → 2.0.4
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/README.md +308 -234
- package/dist/client/index.js.map +1 -1
- package/dist/client/temporal-client.module.js +5 -5
- package/dist/client/temporal-client.module.js.map +1 -1
- package/dist/client/temporal-client.service.d.ts +4 -1
- package/dist/client/temporal-client.service.js +34 -1
- package/dist/client/temporal-client.service.js.map +1 -1
- package/dist/constants.d.ts +2 -8
- package/dist/constants.js +3 -9
- package/dist/constants.js.map +1 -1
- package/dist/decorators/activity-method.decorator.d.ts +1 -7
- package/dist/decorators/activity-method.decorator.js +2 -2
- package/dist/decorators/activity-method.decorator.js.map +1 -1
- package/dist/decorators/activity.decorator.d.ts +1 -4
- package/dist/decorators/activity.decorator.js.map +1 -1
- package/dist/decorators/index.d.ts +4 -0
- package/dist/decorators/index.js +4 -0
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/query.decorator.d.ts +2 -0
- package/dist/decorators/query.decorator.js +26 -0
- package/dist/decorators/query.decorator.js.map +1 -0
- package/dist/decorators/scheduled-workflow.decorator.d.ts +13 -0
- package/dist/decorators/scheduled-workflow.decorator.js +28 -0
- package/dist/decorators/scheduled-workflow.decorator.js.map +1 -0
- package/dist/decorators/signal.decorator.d.ts +2 -0
- package/dist/decorators/signal.decorator.js +26 -0
- package/dist/decorators/signal.decorator.js.map +1 -0
- package/dist/decorators/workflow-method.decorator.d.ts +2 -0
- package/dist/decorators/workflow-method.decorator.js +29 -0
- package/dist/decorators/workflow-method.decorator.js.map +1 -0
- package/dist/decorators/workflow.decorator.d.ts +2 -16
- package/dist/decorators/workflow.decorator.js +1 -0
- package/dist/decorators/workflow.decorator.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/activity.interface.d.ts +20 -0
- package/dist/interfaces/activity.interface.js +3 -0
- package/dist/interfaces/activity.interface.js.map +1 -0
- package/dist/interfaces/client.interface.d.ts +2 -2
- package/dist/interfaces/index.d.ts +3 -0
- package/dist/interfaces/index.js +3 -0
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/schedule.interface.d.ts +17 -0
- package/dist/interfaces/schedule.interface.js +3 -0
- package/dist/interfaces/schedule.interface.js.map +1 -0
- package/dist/interfaces/worker.interface.d.ts +4 -4
- package/dist/interfaces/workflow.interface.d.ts +19 -0
- package/dist/interfaces/workflow.interface.js +3 -0
- package/dist/interfaces/workflow.interface.js.map +1 -0
- package/dist/schedule/index.d.ts +2 -0
- package/dist/schedule/index.js +19 -0
- package/dist/schedule/index.js.map +1 -0
- package/dist/schedule/temporal-schedule.module.d.ts +7 -0
- package/dist/schedule/temporal-schedule.module.js +94 -0
- package/dist/schedule/temporal-schedule.module.js.map +1 -0
- package/dist/schedule/temporal-schedule.service.d.ts +28 -0
- package/dist/schedule/temporal-schedule.service.js +230 -0
- package/dist/schedule/temporal-schedule.service.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ModuleMetadata, Type } from '@nestjs/common';
|
|
2
|
+
export interface TemporalScheduleOptions {
|
|
3
|
+
namespace?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface TemporalScheduleOptionsFactory {
|
|
6
|
+
createScheduleOptions(): Promise<TemporalScheduleOptions> | TemporalScheduleOptions;
|
|
7
|
+
}
|
|
8
|
+
export interface TemporalScheduleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
9
|
+
useExisting?: Type<TemporalScheduleOptionsFactory>;
|
|
10
|
+
useClass?: Type<TemporalScheduleOptionsFactory>;
|
|
11
|
+
useFactory?: (...args: any[]) => Promise<TemporalScheduleOptions> | TemporalScheduleOptions;
|
|
12
|
+
inject?: any[];
|
|
13
|
+
}
|
|
14
|
+
export interface ListSchedulesOptions {
|
|
15
|
+
pageSize?: number;
|
|
16
|
+
query?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.interface.js","sourceRoot":"","sources":["../../src/interfaces/schedule.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ModuleMetadata, Type } from '@nestjs/common';
|
|
2
|
-
import { NativeConnectionOptions, RuntimeOptions
|
|
2
|
+
import { NativeConnectionOptions, RuntimeOptions } from '@temporalio/worker';
|
|
3
3
|
export interface TemporalWorkerOptions {
|
|
4
4
|
connection: NativeConnectionOptions;
|
|
5
|
-
namespace
|
|
5
|
+
namespace?: string;
|
|
6
6
|
taskQueue: string;
|
|
7
7
|
workflowsPath: string;
|
|
8
|
-
activityClasses?: Array<
|
|
8
|
+
activityClasses?: Array<Type<any>>;
|
|
9
9
|
runtimeOptions?: RuntimeOptions;
|
|
10
|
-
workerOptions?:
|
|
10
|
+
workerOptions?: Omit<TemporalWorkerOptions, 'taskQueue' | 'workflowsPath' | 'activities' | 'connection' | 'namespace'>;
|
|
11
11
|
autoStart?: {
|
|
12
12
|
enabled?: boolean;
|
|
13
13
|
delayMs?: number;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RetryPolicy } from '@temporalio/common';
|
|
2
|
+
export interface WorkflowOptions {
|
|
3
|
+
name?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
taskQueue: string;
|
|
6
|
+
workflowExecutionTimeout?: string | number;
|
|
7
|
+
workflowRunTimeout?: string | number;
|
|
8
|
+
workflowTaskTimeout?: string | number;
|
|
9
|
+
retry?: RetryPolicy;
|
|
10
|
+
}
|
|
11
|
+
export interface WorkflowMethodOptions {
|
|
12
|
+
name?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface QueryMethodOptions {
|
|
15
|
+
name?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface SignalMethodOptions {
|
|
18
|
+
name?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.interface.js","sourceRoot":"","sources":["../../src/interfaces/workflow.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./temporal-schedule.module"), exports);
|
|
18
|
+
__exportStar(require("./temporal-schedule.service"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schedule/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,8DAA4C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DynamicModule } from '@nestjs/common';
|
|
2
|
+
import { TemporalScheduleOptions, TemporalScheduleAsyncOptions } from '../interfaces';
|
|
3
|
+
export declare class TemporalScheduleModule {
|
|
4
|
+
static register(options?: TemporalScheduleOptions): DynamicModule;
|
|
5
|
+
static registerAsync(options: TemporalScheduleAsyncOptions): DynamicModule;
|
|
6
|
+
private static createAsyncProviders;
|
|
7
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var TemporalScheduleModule_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.TemporalScheduleModule = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const client_1 = require("../client");
|
|
13
|
+
const constants_1 = require("../constants");
|
|
14
|
+
const temporal_schedule_service_1 = require("./temporal-schedule.service");
|
|
15
|
+
let TemporalScheduleModule = TemporalScheduleModule_1 = class TemporalScheduleModule {
|
|
16
|
+
static register(options = {}) {
|
|
17
|
+
const scheduleOptions = {
|
|
18
|
+
namespace: options.namespace || constants_1.DEFAULT_NAMESPACE,
|
|
19
|
+
...options,
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
module: TemporalScheduleModule_1,
|
|
23
|
+
imports: [client_1.TemporalClientModule],
|
|
24
|
+
providers: [
|
|
25
|
+
{
|
|
26
|
+
provide: constants_1.TEMPORAL_SCHEDULE_MODULE_OPTIONS,
|
|
27
|
+
useValue: scheduleOptions,
|
|
28
|
+
},
|
|
29
|
+
temporal_schedule_service_1.TemporalScheduleService,
|
|
30
|
+
],
|
|
31
|
+
exports: [temporal_schedule_service_1.TemporalScheduleService],
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static registerAsync(options) {
|
|
35
|
+
return {
|
|
36
|
+
module: TemporalScheduleModule_1,
|
|
37
|
+
imports: [client_1.TemporalClientModule, ...(options.imports || [])],
|
|
38
|
+
providers: [...this.createAsyncProviders(options), temporal_schedule_service_1.TemporalScheduleService],
|
|
39
|
+
exports: [temporal_schedule_service_1.TemporalScheduleService],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static createAsyncProviders(options) {
|
|
43
|
+
if (options.useFactory) {
|
|
44
|
+
return [
|
|
45
|
+
{
|
|
46
|
+
provide: constants_1.TEMPORAL_SCHEDULE_MODULE_OPTIONS,
|
|
47
|
+
useFactory: options.useFactory,
|
|
48
|
+
inject: options.inject || [],
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
if (options.useClass) {
|
|
53
|
+
return [
|
|
54
|
+
{
|
|
55
|
+
provide: constants_1.TEMPORAL_SCHEDULE_MODULE_OPTIONS,
|
|
56
|
+
useFactory: async (optionsFactory) => {
|
|
57
|
+
const options = await optionsFactory.createScheduleOptions();
|
|
58
|
+
return {
|
|
59
|
+
namespace: options.namespace || constants_1.DEFAULT_NAMESPACE,
|
|
60
|
+
...options,
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
inject: [options.useClass],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
provide: options.useClass,
|
|
67
|
+
useClass: options.useClass,
|
|
68
|
+
},
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
if (options.useExisting) {
|
|
72
|
+
return [
|
|
73
|
+
{
|
|
74
|
+
provide: constants_1.TEMPORAL_SCHEDULE_MODULE_OPTIONS,
|
|
75
|
+
useFactory: async (optionsFactory) => {
|
|
76
|
+
const options = await optionsFactory.createScheduleOptions();
|
|
77
|
+
return {
|
|
78
|
+
namespace: options.namespace || constants_1.DEFAULT_NAMESPACE,
|
|
79
|
+
...options,
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
inject: [options.useExisting],
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
throw new Error('Invalid module configuration. Please provide useFactory, useClass, or useExisting');
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
exports.TemporalScheduleModule = TemporalScheduleModule;
|
|
90
|
+
exports.TemporalScheduleModule = TemporalScheduleModule = TemporalScheduleModule_1 = __decorate([
|
|
91
|
+
(0, common_1.Global)(),
|
|
92
|
+
(0, common_1.Module)({})
|
|
93
|
+
], TemporalScheduleModule);
|
|
94
|
+
//# sourceMappingURL=temporal-schedule.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temporal-schedule.module.js","sourceRoot":"","sources":["../../src/schedule/temporal-schedule.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAyE;AACzE,sCAAiD;AACjD,4CAAmF;AAMnF,2EAAsE;AAO/D,IAAM,sBAAsB,8BAA5B,MAAM,sBAAsB;IAuB/B,MAAM,CAAC,QAAQ,CAAC,UAAmC,EAAE;QACjD,MAAM,eAAe,GAAG;YACpB,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,6BAAiB;YACjD,GAAG,OAAO;SACb,CAAC;QAEF,OAAO;YACH,MAAM,EAAE,wBAAsB;YAC9B,OAAO,EAAE,CAAC,6BAAoB,CAAC;YAC/B,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,4CAAgC;oBACzC,QAAQ,EAAE,eAAe;iBAC5B;gBACD,mDAAuB;aAC1B;YACD,OAAO,EAAE,CAAC,mDAAuB,CAAC;SACrC,CAAC;IACN,CAAC;IAgCD,MAAM,CAAC,aAAa,CAAC,OAAqC;QACtD,OAAO;YACH,MAAM,EAAE,wBAAsB;YAC9B,OAAO,EAAE,CAAC,6BAAoB,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;YAC3D,SAAS,EAAE,CAAC,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,mDAAuB,C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,CAAC;CACJ,CAAA;AAzIY,wDAAsB;iCAAtB,sBAAsB;IAFlC,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,sBAAsB,CAyIlC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OnModuleInit } from '@nestjs/common';
|
|
2
|
+
import { Client, ScheduleHandle, ScheduleSummary, ScheduleDescription, ScheduleOverlapPolicy } from '@temporalio/client';
|
|
3
|
+
import { TemporalScheduleOptions } from '../interfaces';
|
|
4
|
+
export declare class TemporalScheduleService implements OnModuleInit {
|
|
5
|
+
private readonly options;
|
|
6
|
+
private readonly client;
|
|
7
|
+
private readonly logger;
|
|
8
|
+
private scheduleClient;
|
|
9
|
+
constructor(options: TemporalScheduleOptions, client: Client | null);
|
|
10
|
+
onModuleInit(): Promise<void>;
|
|
11
|
+
private ensureClientInitialized;
|
|
12
|
+
createCronWorkflow(scheduleId: string, workflowType: string, cronExpression: string, taskQueue: string, args?: any[], description?: string): Promise<ScheduleHandle>;
|
|
13
|
+
createIntervalWorkflow(scheduleId: string, workflowType: string, interval: {
|
|
14
|
+
seconds?: number;
|
|
15
|
+
minutes?: number;
|
|
16
|
+
hours?: number;
|
|
17
|
+
days?: number;
|
|
18
|
+
}, taskQueue: string, args?: any[], description?: string): Promise<ScheduleHandle>;
|
|
19
|
+
getSchedule(scheduleId: string): Promise<ScheduleHandle>;
|
|
20
|
+
deleteSchedule(scheduleId: string): Promise<void>;
|
|
21
|
+
pauseSchedule(scheduleId: string, note?: string): Promise<void>;
|
|
22
|
+
resumeSchedule(scheduleId: string, note?: string): Promise<void>;
|
|
23
|
+
triggerNow(scheduleId: string, overlap?: ScheduleOverlapPolicy): Promise<void>;
|
|
24
|
+
backfill(scheduleId: string, startTime: Date, endTime: Date, overlap?: ScheduleOverlapPolicy): Promise<void>;
|
|
25
|
+
describeSchedule(scheduleId: string): Promise<ScheduleDescription>;
|
|
26
|
+
listSchedules(pageSize?: number): Promise<ScheduleSummary[]>;
|
|
27
|
+
private formatInterval;
|
|
28
|
+
}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var TemporalScheduleService_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.TemporalScheduleService = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const client_1 = require("@temporalio/client");
|
|
19
|
+
const constants_1 = require("../constants");
|
|
20
|
+
let TemporalScheduleService = TemporalScheduleService_1 = class TemporalScheduleService {
|
|
21
|
+
constructor(options, client) {
|
|
22
|
+
this.options = options;
|
|
23
|
+
this.client = client;
|
|
24
|
+
this.logger = new common_1.Logger(TemporalScheduleService_1.name);
|
|
25
|
+
this.scheduleClient = null;
|
|
26
|
+
}
|
|
27
|
+
async onModuleInit() {
|
|
28
|
+
if (this.client) {
|
|
29
|
+
this.scheduleClient = this.client.schedule;
|
|
30
|
+
this.logger.log(`Temporal schedule client initialized with namespace: ${this.options.namespace}`);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this.logger.warn('Temporal client not initialized - schedule features will be unavailable');
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
ensureClientInitialized() {
|
|
37
|
+
if (!this.scheduleClient) {
|
|
38
|
+
throw new Error(constants_1.ERRORS.SCHEDULE_CLIENT_NOT_INITIALIZED);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async createCronWorkflow(scheduleId, workflowType, cronExpression, taskQueue, args = [], description) {
|
|
42
|
+
this.ensureClientInitialized();
|
|
43
|
+
try {
|
|
44
|
+
const handle = await this.scheduleClient.create({
|
|
45
|
+
scheduleId,
|
|
46
|
+
spec: {
|
|
47
|
+
cronExpressions: [cronExpression],
|
|
48
|
+
},
|
|
49
|
+
action: {
|
|
50
|
+
type: 'startWorkflow',
|
|
51
|
+
workflowType,
|
|
52
|
+
taskQueue,
|
|
53
|
+
args,
|
|
54
|
+
workflowId: `${scheduleId}-${Date.now()}`,
|
|
55
|
+
},
|
|
56
|
+
memo: description ? { description } : undefined,
|
|
57
|
+
});
|
|
58
|
+
this.logger.log(`Created cron workflow schedule: ${scheduleId} with expression: ${cronExpression}`);
|
|
59
|
+
return handle;
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
this.logger.error(`Failed to create schedule '${scheduleId}': ${error.message}`);
|
|
63
|
+
throw new Error(`Failed to create schedule '${scheduleId}': ${error.message}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
async createIntervalWorkflow(scheduleId, workflowType, interval, taskQueue, args = [], description) {
|
|
67
|
+
this.ensureClientInitialized();
|
|
68
|
+
try {
|
|
69
|
+
const msPerSecond = 1000;
|
|
70
|
+
const msPerMinute = 60 * msPerSecond;
|
|
71
|
+
const msPerHour = 60 * msPerMinute;
|
|
72
|
+
const msPerDay = 24 * msPerHour;
|
|
73
|
+
let totalMs = 0;
|
|
74
|
+
if (interval.days)
|
|
75
|
+
totalMs += interval.days * msPerDay;
|
|
76
|
+
if (interval.hours)
|
|
77
|
+
totalMs += interval.hours * msPerHour;
|
|
78
|
+
if (interval.minutes)
|
|
79
|
+
totalMs += interval.minutes * msPerMinute;
|
|
80
|
+
if (interval.seconds)
|
|
81
|
+
totalMs += interval.seconds * msPerSecond;
|
|
82
|
+
if (totalMs === 0)
|
|
83
|
+
totalMs = msPerMinute;
|
|
84
|
+
const handle = await this.scheduleClient.create({
|
|
85
|
+
scheduleId,
|
|
86
|
+
spec: {
|
|
87
|
+
intervals: [
|
|
88
|
+
{
|
|
89
|
+
every: totalMs,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
action: {
|
|
94
|
+
type: 'startWorkflow',
|
|
95
|
+
workflowType,
|
|
96
|
+
taskQueue,
|
|
97
|
+
args,
|
|
98
|
+
workflowId: `${scheduleId}-${Date.now()}`,
|
|
99
|
+
},
|
|
100
|
+
memo: description ? { description } : undefined,
|
|
101
|
+
});
|
|
102
|
+
this.logger.log(`Created interval workflow schedule: ${scheduleId} with interval: ${this.formatInterval(interval)}`);
|
|
103
|
+
return handle;
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
this.logger.error(`Failed to create schedule '${scheduleId}': ${error.message}`);
|
|
107
|
+
throw new Error(`Failed to create schedule '${scheduleId}': ${error.message}`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
async getSchedule(scheduleId) {
|
|
111
|
+
this.ensureClientInitialized();
|
|
112
|
+
try {
|
|
113
|
+
return this.scheduleClient.getHandle(scheduleId);
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
this.logger.error(`Failed to get schedule '${scheduleId}': ${error.message}`);
|
|
117
|
+
throw new Error(`Failed to get schedule '${scheduleId}': ${error.message}`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
async deleteSchedule(scheduleId) {
|
|
121
|
+
this.ensureClientInitialized();
|
|
122
|
+
try {
|
|
123
|
+
const handle = this.scheduleClient.getHandle(scheduleId);
|
|
124
|
+
await handle.delete();
|
|
125
|
+
this.logger.log(`Deleted schedule: ${scheduleId}`);
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
this.logger.error(`Failed to delete schedule '${scheduleId}': ${error.message}`);
|
|
129
|
+
throw new Error(`Failed to delete schedule '${scheduleId}': ${error.message}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async pauseSchedule(scheduleId, note) {
|
|
133
|
+
this.ensureClientInitialized();
|
|
134
|
+
try {
|
|
135
|
+
const handle = this.scheduleClient.getHandle(scheduleId);
|
|
136
|
+
await handle.pause(note || 'Paused via NestJS Temporal integration');
|
|
137
|
+
this.logger.log(`Paused schedule: ${scheduleId}${note ? ` (${note})` : ''}`);
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
this.logger.error(`Failed to pause schedule '${scheduleId}': ${error.message}`);
|
|
141
|
+
throw new Error(`Failed to pause schedule '${scheduleId}': ${error.message}`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
async resumeSchedule(scheduleId, note) {
|
|
145
|
+
this.ensureClientInitialized();
|
|
146
|
+
try {
|
|
147
|
+
const handle = this.scheduleClient.getHandle(scheduleId);
|
|
148
|
+
await handle.unpause(note || 'Resumed via NestJS Temporal integration');
|
|
149
|
+
this.logger.log(`Resumed schedule: ${scheduleId}`);
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
this.logger.error(`Failed to resume schedule '${scheduleId}': ${error.message}`);
|
|
153
|
+
throw new Error(`Failed to resume schedule '${scheduleId}': ${error.message}`);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
async triggerNow(scheduleId, overlap) {
|
|
157
|
+
this.ensureClientInitialized();
|
|
158
|
+
try {
|
|
159
|
+
const handle = this.scheduleClient.getHandle(scheduleId);
|
|
160
|
+
await handle.trigger(overlap || client_1.ScheduleOverlapPolicy.ALLOW_ALL);
|
|
161
|
+
this.logger.log(`Triggered immediate run of schedule: ${scheduleId}`);
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
this.logger.error(`Failed to trigger schedule '${scheduleId}': ${error.message}`);
|
|
165
|
+
throw new Error(`Failed to trigger schedule '${scheduleId}': ${error.message}`);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
async backfill(scheduleId, startTime, endTime, overlap) {
|
|
169
|
+
this.ensureClientInitialized();
|
|
170
|
+
try {
|
|
171
|
+
const handle = this.scheduleClient.getHandle(scheduleId);
|
|
172
|
+
const backfill = {
|
|
173
|
+
start: startTime,
|
|
174
|
+
end: endTime,
|
|
175
|
+
overlap: overlap || client_1.ScheduleOverlapPolicy.ALLOW_ALL,
|
|
176
|
+
};
|
|
177
|
+
await handle.backfill(backfill);
|
|
178
|
+
this.logger.log(`Backfilled schedule: ${scheduleId} from ${startTime.toISOString()} to ${endTime.toISOString()}`);
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
this.logger.error(`Failed to backfill schedule '${scheduleId}': ${error.message}`);
|
|
182
|
+
throw new Error(`Failed to backfill schedule '${scheduleId}': ${error.message}`);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
async describeSchedule(scheduleId) {
|
|
186
|
+
this.ensureClientInitialized();
|
|
187
|
+
try {
|
|
188
|
+
const handle = this.scheduleClient.getHandle(scheduleId);
|
|
189
|
+
return await handle.describe();
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
this.logger.error(`Failed to describe schedule '${scheduleId}': ${error.message}`);
|
|
193
|
+
throw new Error(`Failed to describe schedule '${scheduleId}': ${error.message}`);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
async listSchedules(pageSize = 100) {
|
|
197
|
+
this.ensureClientInitialized();
|
|
198
|
+
try {
|
|
199
|
+
const schedules = [];
|
|
200
|
+
for await (const schedule of this.scheduleClient.list({ pageSize })) {
|
|
201
|
+
schedules.push(schedule);
|
|
202
|
+
}
|
|
203
|
+
return schedules;
|
|
204
|
+
}
|
|
205
|
+
catch (error) {
|
|
206
|
+
this.logger.error(`Failed to list schedules: ${error.message}`);
|
|
207
|
+
throw new Error(`Failed to list schedules: ${error.message}`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
formatInterval(interval) {
|
|
211
|
+
const parts = [];
|
|
212
|
+
if (interval.days)
|
|
213
|
+
parts.push(`${interval.days} day(s)`);
|
|
214
|
+
if (interval.hours)
|
|
215
|
+
parts.push(`${interval.hours} hour(s)`);
|
|
216
|
+
if (interval.minutes)
|
|
217
|
+
parts.push(`${interval.minutes} minute(s)`);
|
|
218
|
+
if (interval.seconds)
|
|
219
|
+
parts.push(`${interval.seconds} second(s)`);
|
|
220
|
+
return parts.length > 0 ? parts.join(', ') : '1 minute (default)';
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
exports.TemporalScheduleService = TemporalScheduleService;
|
|
224
|
+
exports.TemporalScheduleService = TemporalScheduleService = TemporalScheduleService_1 = __decorate([
|
|
225
|
+
(0, common_1.Injectable)(),
|
|
226
|
+
__param(0, (0, common_1.Inject)(constants_1.TEMPORAL_SCHEDULE_MODULE_OPTIONS)),
|
|
227
|
+
__param(1, (0, common_1.Inject)(constants_1.TEMPORAL_CLIENT)),
|
|
228
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
229
|
+
], TemporalScheduleService);
|
|
230
|
+
//# sourceMappingURL=temporal-schedule.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temporal-schedule.service.js","sourceRoot":"","sources":["../../src/schedule/temporal-schedule.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA0E;AAC1E,+CAQ4B;AAC5B,4CAAyF;AAIlF,IAAM,uBAAuB,+BAA7B,MAAM,uBAAuB;IAIhC,YAEI,OAAiD,EAEjD,MAAsC;QAFrB,YAAO,GAAP,OAAO,CAAyB;QAEhC,WAAM,GAAN,MAAM,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