@alterior/tasks 3.13.3 → 3.14.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/index.d.ts +4 -4
- package/dist/index.js +7 -7
- package/dist/task-runner.d.ts +18 -18
- package/dist/task-runner.js +35 -35
- package/dist/task-runner.js.map +1 -1
- package/dist/task-worker.d.ts +25 -25
- package/dist/task-worker.js +98 -98
- package/dist/task-worker.js.map +1 -1
- package/dist/tasks.d.ts +92 -92
- package/dist/tasks.js +156 -156
- package/dist/tasks.js.map +1 -1
- package/dist/tasks.module.d.ts +46 -46
- package/dist/tasks.module.js +96 -95
- package/dist/tasks.module.js.map +1 -1
- package/dist/test.d.ts +1 -1
- package/dist.esm/index.d.ts +4 -4
- package/dist.esm/index.js +4 -4
- package/dist.esm/task-runner.d.ts +18 -18
- package/dist.esm/task-runner.js +32 -32
- package/dist.esm/task-runner.js.map +1 -1
- package/dist.esm/task-worker.d.ts +25 -25
- package/dist.esm/task-worker.js +94 -94
- package/dist.esm/task-worker.js.map +1 -1
- package/dist.esm/tasks.d.ts +92 -92
- package/dist.esm/tasks.js +151 -151
- package/dist.esm/tasks.js.map +1 -1
- package/dist.esm/tasks.module.d.ts +46 -46
- package/dist.esm/tasks.module.js +93 -92
- package/dist.esm/tasks.module.js.map +1 -1
- package/dist.esm/test.d.ts +1 -1
- package/package.json +11 -11
- package/src/tasks.module.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -0
- package/tsconfig.json +0 -2
- package/tsconfig.tsbuildinfo +1 -5845
package/dist.esm/tasks.js
CHANGED
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
import { __awaiter, __decorate, __metadata, __param } from "tslib";
|
|
2
|
-
import { Annotation, MetadataName } from "@alterior/annotations";
|
|
3
|
-
import { Injectable, InjectionToken, Optional, Injector, ReflectiveInjector } from "@alterior/di";
|
|
4
|
-
import BullQueue from "bull";
|
|
5
|
-
/**
|
|
6
|
-
* This injectable allows configuration of the task system.
|
|
7
|
-
* Include a provider for the injection token `QUEUE_OPTIONS`
|
|
8
|
-
* which provides an instance of this class.
|
|
9
|
-
*
|
|
10
|
-
* For instance: `[ provide: QUEUE_OPTIONS, useValue: new TaskClientOptionsRef({ optionsHere }) ]`
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
|
-
let TaskModuleOptionsRef = class TaskModuleOptionsRef {
|
|
14
|
-
constructor(options) {
|
|
15
|
-
this.options = options;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
TaskModuleOptionsRef = __decorate([
|
|
19
|
-
Injectable(),
|
|
20
|
-
__metadata("design:paramtypes", [Object])
|
|
21
|
-
], TaskModuleOptionsRef);
|
|
22
|
-
export { TaskModuleOptionsRef };
|
|
23
|
-
export const QUEUE_OPTIONS = new InjectionToken('QueueOptions');
|
|
24
|
-
let TaskAnnotation = class TaskAnnotation extends Annotation {
|
|
25
|
-
constructor(id) {
|
|
26
|
-
super();
|
|
27
|
-
this.id = id;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
TaskAnnotation = __decorate([
|
|
31
|
-
MetadataName('@alterior/tasks:Task'),
|
|
32
|
-
__metadata("design:paramtypes", [String])
|
|
33
|
-
], TaskAnnotation);
|
|
34
|
-
export { TaskAnnotation };
|
|
35
|
-
export const Task = TaskAnnotation.decorator();
|
|
36
|
-
export class Worker {
|
|
37
|
-
get options() { return undefined; }
|
|
38
|
-
get currentJob() {
|
|
39
|
-
return Zone.current.get('workerStateJob');
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
export class TaskWorkerProxy {
|
|
43
|
-
static create(handler) {
|
|
44
|
-
return new Proxy({}, {
|
|
45
|
-
get(t, key, receiver) {
|
|
46
|
-
return (...args) => handler(key, ...args);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
static createAsync(queueClient, id, options) {
|
|
51
|
-
return this.create((method, ...args) => {
|
|
52
|
-
if (method === 'withOptions')
|
|
53
|
-
return TaskWorkerProxy.createAsync(queueClient, id, Object.assign({}, options, args[0]));
|
|
54
|
-
else
|
|
55
|
-
return queueClient.enqueue({ id, method, args }, options);
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
static createSync(queueClient, id, options) {
|
|
59
|
-
return this.create((method, ...args) => {
|
|
60
|
-
if (method === 'withOptions')
|
|
61
|
-
return TaskWorkerProxy.createSync(queueClient, id, Object.assign({}, options, args[0]));
|
|
62
|
-
else
|
|
63
|
-
return queueClient.enqueue({ id, method, args }, options).then(v => v.finished);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
let TaskQueueClient = class TaskQueueClient {
|
|
68
|
-
constructor(optionsRef) {
|
|
69
|
-
this.optionsRef = optionsRef;
|
|
70
|
-
this._queue = new BullQueue(this.queueName, this.queueOptions);
|
|
71
|
-
}
|
|
72
|
-
get queue() {
|
|
73
|
-
return this._queue;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Get the task client options. See
|
|
77
|
-
*/
|
|
78
|
-
get options() {
|
|
79
|
-
return (this.optionsRef ? this.optionsRef.options : undefined) || {};
|
|
80
|
-
}
|
|
81
|
-
get queueName() {
|
|
82
|
-
return this.options.queueName || 'alteriorTasks';
|
|
83
|
-
}
|
|
84
|
-
get queueOptions() {
|
|
85
|
-
let queueOptions = Object.assign({}, this.options.queueOptions);
|
|
86
|
-
if (!queueOptions.redis) {
|
|
87
|
-
queueOptions.redis = {
|
|
88
|
-
port: 6379,
|
|
89
|
-
host: '127.0.0.1',
|
|
90
|
-
db: 6
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
return queueOptions;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Enqueue a new task. To handle the task on the worker side, register for it with `.process()`
|
|
97
|
-
*/
|
|
98
|
-
enqueue(data, opts) {
|
|
99
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
-
return yield this._queue.add(data, opts);
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
TaskQueueClient = __decorate([
|
|
105
|
-
Injectable(),
|
|
106
|
-
__param(0, Optional()),
|
|
107
|
-
__metadata("design:paramtypes", [TaskModuleOptionsRef])
|
|
108
|
-
], TaskQueueClient);
|
|
109
|
-
export { TaskQueueClient };
|
|
110
|
-
let TaskWorkerRegistry = class TaskWorkerRegistry {
|
|
111
|
-
constructor(injector, client) {
|
|
112
|
-
this.injector = injector;
|
|
113
|
-
this.client = client;
|
|
114
|
-
this._entries = {};
|
|
115
|
-
}
|
|
116
|
-
registerClass(injector, taskClass) {
|
|
117
|
-
let instance = injector.get(taskClass);
|
|
118
|
-
let id = instance.name;
|
|
119
|
-
if (this._entries[id])
|
|
120
|
-
throw new Error(`Another worker is already registered with name '${id}'`);
|
|
121
|
-
this._entries[id] = {
|
|
122
|
-
type: taskClass,
|
|
123
|
-
local: instance,
|
|
124
|
-
sync: TaskWorkerProxy.createSync(this.client, id, instance.options),
|
|
125
|
-
async: TaskWorkerProxy.createAsync(this.client, id, instance.options)
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
get all() {
|
|
129
|
-
return Object.values(this._entries);
|
|
130
|
-
}
|
|
131
|
-
get(cls) {
|
|
132
|
-
let entry = this.all.find(x => x.type === cls);
|
|
133
|
-
if (!entry)
|
|
134
|
-
throw new Error(`Worker class ${cls.name} is not registered. Add it to the 'tasks' property of a module or call TaskWorkerRegistry.register(${cls.name})`);
|
|
135
|
-
return entry;
|
|
136
|
-
}
|
|
137
|
-
getByName(name) {
|
|
138
|
-
return this._entries[name];
|
|
139
|
-
}
|
|
140
|
-
registerClasses(classes) {
|
|
141
|
-
let taskClasses = classes;
|
|
142
|
-
let ownInjector = ReflectiveInjector.resolveAndCreate(taskClasses, this.injector);
|
|
143
|
-
taskClasses.forEach(taskClass => this.registerClass(ownInjector, taskClass));
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
TaskWorkerRegistry = __decorate([
|
|
147
|
-
Injectable(),
|
|
148
|
-
__metadata("design:paramtypes", [Injector,
|
|
149
|
-
TaskQueueClient])
|
|
150
|
-
], TaskWorkerRegistry);
|
|
151
|
-
export { TaskWorkerRegistry };
|
|
1
|
+
import { __awaiter, __decorate, __metadata, __param } from "tslib";
|
|
2
|
+
import { Annotation, MetadataName } from "@alterior/annotations";
|
|
3
|
+
import { Injectable, InjectionToken, Optional, Injector, ReflectiveInjector } from "@alterior/di";
|
|
4
|
+
import BullQueue from "bull";
|
|
5
|
+
/**
|
|
6
|
+
* This injectable allows configuration of the task system.
|
|
7
|
+
* Include a provider for the injection token `QUEUE_OPTIONS`
|
|
8
|
+
* which provides an instance of this class.
|
|
9
|
+
*
|
|
10
|
+
* For instance: `[ provide: QUEUE_OPTIONS, useValue: new TaskClientOptionsRef({ optionsHere }) ]`
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
let TaskModuleOptionsRef = class TaskModuleOptionsRef {
|
|
14
|
+
constructor(options) {
|
|
15
|
+
this.options = options;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
TaskModuleOptionsRef = __decorate([
|
|
19
|
+
Injectable(),
|
|
20
|
+
__metadata("design:paramtypes", [Object])
|
|
21
|
+
], TaskModuleOptionsRef);
|
|
22
|
+
export { TaskModuleOptionsRef };
|
|
23
|
+
export const QUEUE_OPTIONS = new InjectionToken('QueueOptions');
|
|
24
|
+
let TaskAnnotation = class TaskAnnotation extends Annotation {
|
|
25
|
+
constructor(id) {
|
|
26
|
+
super();
|
|
27
|
+
this.id = id;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
TaskAnnotation = __decorate([
|
|
31
|
+
MetadataName('@alterior/tasks:Task'),
|
|
32
|
+
__metadata("design:paramtypes", [String])
|
|
33
|
+
], TaskAnnotation);
|
|
34
|
+
export { TaskAnnotation };
|
|
35
|
+
export const Task = TaskAnnotation.decorator();
|
|
36
|
+
export class Worker {
|
|
37
|
+
get options() { return undefined; }
|
|
38
|
+
get currentJob() {
|
|
39
|
+
return Zone.current.get('workerStateJob');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export class TaskWorkerProxy {
|
|
43
|
+
static create(handler) {
|
|
44
|
+
return new Proxy({}, {
|
|
45
|
+
get(t, key, receiver) {
|
|
46
|
+
return (...args) => handler(key, ...args);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
static createAsync(queueClient, id, options) {
|
|
51
|
+
return this.create((method, ...args) => {
|
|
52
|
+
if (method === 'withOptions')
|
|
53
|
+
return TaskWorkerProxy.createAsync(queueClient, id, Object.assign({}, options, args[0]));
|
|
54
|
+
else
|
|
55
|
+
return queueClient.enqueue({ id, method, args }, options);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
static createSync(queueClient, id, options) {
|
|
59
|
+
return this.create((method, ...args) => {
|
|
60
|
+
if (method === 'withOptions')
|
|
61
|
+
return TaskWorkerProxy.createSync(queueClient, id, Object.assign({}, options, args[0]));
|
|
62
|
+
else
|
|
63
|
+
return queueClient.enqueue({ id, method, args }, options).then(v => v.finished);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
let TaskQueueClient = class TaskQueueClient {
|
|
68
|
+
constructor(optionsRef) {
|
|
69
|
+
this.optionsRef = optionsRef;
|
|
70
|
+
this._queue = new BullQueue(this.queueName, this.queueOptions);
|
|
71
|
+
}
|
|
72
|
+
get queue() {
|
|
73
|
+
return this._queue;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get the task client options. See
|
|
77
|
+
*/
|
|
78
|
+
get options() {
|
|
79
|
+
return (this.optionsRef ? this.optionsRef.options : undefined) || {};
|
|
80
|
+
}
|
|
81
|
+
get queueName() {
|
|
82
|
+
return this.options.queueName || 'alteriorTasks';
|
|
83
|
+
}
|
|
84
|
+
get queueOptions() {
|
|
85
|
+
let queueOptions = Object.assign({}, this.options.queueOptions);
|
|
86
|
+
if (!queueOptions.redis) {
|
|
87
|
+
queueOptions.redis = {
|
|
88
|
+
port: 6379,
|
|
89
|
+
host: '127.0.0.1',
|
|
90
|
+
db: 6
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return queueOptions;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Enqueue a new task. To handle the task on the worker side, register for it with `.process()`
|
|
97
|
+
*/
|
|
98
|
+
enqueue(data, opts) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
return yield this._queue.add(data, opts);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
TaskQueueClient = __decorate([
|
|
105
|
+
Injectable(),
|
|
106
|
+
__param(0, Optional()),
|
|
107
|
+
__metadata("design:paramtypes", [TaskModuleOptionsRef])
|
|
108
|
+
], TaskQueueClient);
|
|
109
|
+
export { TaskQueueClient };
|
|
110
|
+
let TaskWorkerRegistry = class TaskWorkerRegistry {
|
|
111
|
+
constructor(injector, client) {
|
|
112
|
+
this.injector = injector;
|
|
113
|
+
this.client = client;
|
|
114
|
+
this._entries = {};
|
|
115
|
+
}
|
|
116
|
+
registerClass(injector, taskClass) {
|
|
117
|
+
let instance = injector.get(taskClass);
|
|
118
|
+
let id = instance.name;
|
|
119
|
+
if (this._entries[id])
|
|
120
|
+
throw new Error(`Another worker is already registered with name '${id}'`);
|
|
121
|
+
this._entries[id] = {
|
|
122
|
+
type: taskClass,
|
|
123
|
+
local: instance,
|
|
124
|
+
sync: TaskWorkerProxy.createSync(this.client, id, instance.options),
|
|
125
|
+
async: TaskWorkerProxy.createAsync(this.client, id, instance.options)
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
get all() {
|
|
129
|
+
return Object.values(this._entries);
|
|
130
|
+
}
|
|
131
|
+
get(cls) {
|
|
132
|
+
let entry = this.all.find(x => x.type === cls);
|
|
133
|
+
if (!entry)
|
|
134
|
+
throw new Error(`Worker class ${cls.name} is not registered. Add it to the 'tasks' property of a module or call TaskWorkerRegistry.register(${cls.name})`);
|
|
135
|
+
return entry;
|
|
136
|
+
}
|
|
137
|
+
getByName(name) {
|
|
138
|
+
return this._entries[name];
|
|
139
|
+
}
|
|
140
|
+
registerClasses(classes) {
|
|
141
|
+
let taskClasses = classes;
|
|
142
|
+
let ownInjector = ReflectiveInjector.resolveAndCreate(taskClasses, this.injector);
|
|
143
|
+
taskClasses.forEach(taskClass => this.registerClass(ownInjector, taskClass));
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
TaskWorkerRegistry = __decorate([
|
|
147
|
+
Injectable(),
|
|
148
|
+
__metadata("design:paramtypes", [Injector,
|
|
149
|
+
TaskQueueClient])
|
|
150
|
+
], TaskWorkerRegistry);
|
|
151
|
+
export { TaskWorkerRegistry };
|
|
152
152
|
//# sourceMappingURL=tasks.js.map
|
package/dist.esm/tasks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../src/tasks.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAuB,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAY,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC5G,OAAO,SAAS,MAAM,MAAM,CAAC;AAQ7B;;;;;;;GAOG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC7B,YAAY,OAA2B;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;CAGJ,CAAA;AANY,oBAAoB;IADhC,UAAU,EAAE;;GACA,oBAAoB,CAMhC
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../src/tasks.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAuB,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,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AAe;GAH3B,kBAAkB,CA+C9B"}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { OnInit, Application, RolesService } from "@alterior/runtime";
|
|
2
|
-
import { TaskModuleOptions, TaskModuleOptionsRef, TaskQueueClient, TaskWorkerRegistry } from "./tasks";
|
|
3
|
-
import { TaskWorker } from "./task-worker";
|
|
4
|
-
import { Logger } from "@alterior/logging";
|
|
5
|
-
/**
|
|
6
|
-
* Import this into your application module to run tasks enqueued by other
|
|
7
|
-
* services on a shared queue. The tasks which can be processed are specified
|
|
8
|
-
* in the `tasks` field of one or more modules.
|
|
9
|
-
*/
|
|
10
|
-
export declare class TasksModule implements OnInit {
|
|
11
|
-
private app;
|
|
12
|
-
private rolesService;
|
|
13
|
-
private client;
|
|
14
|
-
private workerRegistry;
|
|
15
|
-
private logger;
|
|
16
|
-
private _options;
|
|
17
|
-
constructor(app: Application, rolesService: RolesService, client: TaskQueueClient, workerRegistry: TaskWorkerRegistry, logger: Logger, _options: TaskModuleOptionsRef);
|
|
18
|
-
/**
|
|
19
|
-
* Used when importing this module from the root (app) module
|
|
20
|
-
* using the default configuration.
|
|
21
|
-
* Should be called only once in the application.
|
|
22
|
-
*/
|
|
23
|
-
static forRoot(): {
|
|
24
|
-
$module: typeof TasksModule;
|
|
25
|
-
providers: {
|
|
26
|
-
provide: typeof TaskModuleOptionsRef;
|
|
27
|
-
useValue: TaskModuleOptionsRef;
|
|
28
|
-
}[];
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Create a configured version of the WebServerModule that can be then
|
|
32
|
-
* be imported into an entry module (or feature module).
|
|
33
|
-
* @param options The options to use for the web server
|
|
34
|
-
*/
|
|
35
|
-
static configure(options: TaskModuleOptions): {
|
|
36
|
-
$module: typeof TasksModule;
|
|
37
|
-
providers: {
|
|
38
|
-
provide: typeof TaskModuleOptionsRef;
|
|
39
|
-
useValue: TaskModuleOptionsRef;
|
|
40
|
-
}[];
|
|
41
|
-
};
|
|
42
|
-
worker: TaskWorker;
|
|
43
|
-
get options(): TaskModuleOptions;
|
|
44
|
-
get tasks(): Function[];
|
|
45
|
-
altOnInit(): void;
|
|
46
|
-
}
|
|
1
|
+
import { OnInit, Application, RolesService } from "@alterior/runtime";
|
|
2
|
+
import { TaskModuleOptions, TaskModuleOptionsRef, TaskQueueClient, TaskWorkerRegistry } from "./tasks";
|
|
3
|
+
import { TaskWorker } from "./task-worker";
|
|
4
|
+
import { Logger } from "@alterior/logging";
|
|
5
|
+
/**
|
|
6
|
+
* Import this into your application module to run tasks enqueued by other
|
|
7
|
+
* services on a shared queue. The tasks which can be processed are specified
|
|
8
|
+
* in the `tasks` field of one or more modules.
|
|
9
|
+
*/
|
|
10
|
+
export declare class TasksModule implements OnInit {
|
|
11
|
+
private app;
|
|
12
|
+
private rolesService;
|
|
13
|
+
private client;
|
|
14
|
+
private workerRegistry;
|
|
15
|
+
private logger;
|
|
16
|
+
private _options;
|
|
17
|
+
constructor(app: Application, rolesService: RolesService, client: TaskQueueClient, workerRegistry: TaskWorkerRegistry, logger: Logger, _options: TaskModuleOptionsRef);
|
|
18
|
+
/**
|
|
19
|
+
* Used when importing this module from the root (app) module
|
|
20
|
+
* using the default configuration.
|
|
21
|
+
* Should be called only once in the application.
|
|
22
|
+
*/
|
|
23
|
+
static forRoot(): {
|
|
24
|
+
$module: typeof TasksModule;
|
|
25
|
+
providers: {
|
|
26
|
+
provide: typeof TaskModuleOptionsRef;
|
|
27
|
+
useValue: TaskModuleOptionsRef;
|
|
28
|
+
}[];
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Create a configured version of the WebServerModule that can be then
|
|
32
|
+
* be imported into an entry module (or feature module).
|
|
33
|
+
* @param options The options to use for the web server
|
|
34
|
+
*/
|
|
35
|
+
static configure(options: TaskModuleOptions): {
|
|
36
|
+
$module: typeof TasksModule;
|
|
37
|
+
providers: {
|
|
38
|
+
provide: typeof TaskModuleOptionsRef;
|
|
39
|
+
useValue: TaskModuleOptionsRef;
|
|
40
|
+
}[];
|
|
41
|
+
};
|
|
42
|
+
worker: TaskWorker;
|
|
43
|
+
get options(): TaskModuleOptions;
|
|
44
|
+
get tasks(): Function[];
|
|
45
|
+
altOnInit(): void;
|
|
46
|
+
}
|
|
47
47
|
//# sourceMappingURL=tasks.module.d.ts.map
|
package/dist.esm/tasks.module.js
CHANGED
|
@@ -1,93 +1,94 @@
|
|
|
1
|
-
var TasksModule_1;
|
|
2
|
-
import { __awaiter, __decorate, __metadata, __param } from "tslib";
|
|
3
|
-
import { Module, Optional } from "@alterior/di";
|
|
4
|
-
import { Application, RolesService } from "@alterior/runtime";
|
|
5
|
-
import { TaskModuleOptionsRef, TaskQueueClient, TaskWorkerRegistry } from "./tasks";
|
|
6
|
-
import { TaskRunner } from "./task-runner";
|
|
7
|
-
import { TaskWorker } from "./task-worker";
|
|
8
|
-
import { Logger, LoggingModule } from "@alterior/logging";
|
|
9
|
-
/**
|
|
10
|
-
* Import this into your application module to run tasks enqueued by other
|
|
11
|
-
* services on a shared queue. The tasks which can be processed are specified
|
|
12
|
-
* in the `tasks` field of one or more modules.
|
|
13
|
-
*/
|
|
14
|
-
let TasksModule = TasksModule_1 = class TasksModule {
|
|
15
|
-
constructor(app, rolesService, client, workerRegistry, logger, _options) {
|
|
16
|
-
this.app = app;
|
|
17
|
-
this.rolesService = rolesService;
|
|
18
|
-
this.client = client;
|
|
19
|
-
this.workerRegistry = workerRegistry;
|
|
20
|
-
this.logger = logger;
|
|
21
|
-
this._options = _options;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Used when importing this module from the root (app) module
|
|
25
|
-
* using the default configuration.
|
|
26
|
-
* Should be called only once in the application.
|
|
27
|
-
*/
|
|
28
|
-
static forRoot() {
|
|
29
|
-
return this.configure({});
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Create a configured version of the WebServerModule that can be then
|
|
33
|
-
* be imported into an entry module (or feature module).
|
|
34
|
-
* @param options The options to use for the web server
|
|
35
|
-
*/
|
|
36
|
-
static configure(options) {
|
|
37
|
-
return {
|
|
38
|
-
$module: TasksModule_1,
|
|
39
|
-
providers: [
|
|
40
|
-
{ provide: TaskModuleOptionsRef, useValue: new TaskModuleOptionsRef(options) }
|
|
41
|
-
]
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
get options() {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
this.
|
|
53
|
-
this.worker
|
|
54
|
-
|
|
55
|
-
this
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
]
|
|
92
|
-
|
|
1
|
+
var TasksModule_1;
|
|
2
|
+
import { __awaiter, __decorate, __metadata, __param } from "tslib";
|
|
3
|
+
import { Module, Optional } from "@alterior/di";
|
|
4
|
+
import { Application, RolesService } from "@alterior/runtime";
|
|
5
|
+
import { TaskModuleOptionsRef, TaskQueueClient, TaskWorkerRegistry } from "./tasks";
|
|
6
|
+
import { TaskRunner } from "./task-runner";
|
|
7
|
+
import { TaskWorker } from "./task-worker";
|
|
8
|
+
import { Logger, LoggingModule } from "@alterior/logging";
|
|
9
|
+
/**
|
|
10
|
+
* Import this into your application module to run tasks enqueued by other
|
|
11
|
+
* services on a shared queue. The tasks which can be processed are specified
|
|
12
|
+
* in the `tasks` field of one or more modules.
|
|
13
|
+
*/
|
|
14
|
+
let TasksModule = TasksModule_1 = class TasksModule {
|
|
15
|
+
constructor(app, rolesService, client, workerRegistry, logger, _options) {
|
|
16
|
+
this.app = app;
|
|
17
|
+
this.rolesService = rolesService;
|
|
18
|
+
this.client = client;
|
|
19
|
+
this.workerRegistry = workerRegistry;
|
|
20
|
+
this.logger = logger;
|
|
21
|
+
this._options = _options;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Used when importing this module from the root (app) module
|
|
25
|
+
* using the default configuration.
|
|
26
|
+
* Should be called only once in the application.
|
|
27
|
+
*/
|
|
28
|
+
static forRoot() {
|
|
29
|
+
return this.configure({});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Create a configured version of the WebServerModule that can be then
|
|
33
|
+
* be imported into an entry module (or feature module).
|
|
34
|
+
* @param options The options to use for the web server
|
|
35
|
+
*/
|
|
36
|
+
static configure(options) {
|
|
37
|
+
return {
|
|
38
|
+
$module: TasksModule_1,
|
|
39
|
+
providers: [
|
|
40
|
+
{ provide: TaskModuleOptionsRef, useValue: new TaskModuleOptionsRef(options) }
|
|
41
|
+
]
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
get options() {
|
|
45
|
+
var _a, _b;
|
|
46
|
+
return (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.options) !== null && _b !== void 0 ? _b : {};
|
|
47
|
+
}
|
|
48
|
+
get tasks() {
|
|
49
|
+
return [].concat(...this.app.runtime.definitions.map(x => x.metadata.tasks || []));
|
|
50
|
+
}
|
|
51
|
+
altOnInit() {
|
|
52
|
+
this.workerRegistry.registerClasses(this.tasks);
|
|
53
|
+
this.worker = new TaskWorker(this.app.runtime.injector, this.client, this.options, this.app.options, this.logger);
|
|
54
|
+
this.worker.registerClasses(this.tasks);
|
|
55
|
+
let self = this;
|
|
56
|
+
this.rolesService.registerRole({
|
|
57
|
+
identifier: 'task-worker',
|
|
58
|
+
instance: this,
|
|
59
|
+
name: 'Task Worker',
|
|
60
|
+
summary: 'Pulls from the task queue and executes them using task classes registered in the module tree',
|
|
61
|
+
start() {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
self.worker.start();
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
stop() {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
self.worker.stop();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
TasksModule = TasksModule_1 = __decorate([
|
|
75
|
+
Module({
|
|
76
|
+
providers: [
|
|
77
|
+
TaskQueueClient,
|
|
78
|
+
TaskWorkerRegistry,
|
|
79
|
+
TaskRunner
|
|
80
|
+
],
|
|
81
|
+
imports: [
|
|
82
|
+
LoggingModule
|
|
83
|
+
]
|
|
84
|
+
}),
|
|
85
|
+
__param(5, Optional()),
|
|
86
|
+
__metadata("design:paramtypes", [Application,
|
|
87
|
+
RolesService,
|
|
88
|
+
TaskQueueClient,
|
|
89
|
+
TaskWorkerRegistry,
|
|
90
|
+
Logger,
|
|
91
|
+
TaskModuleOptionsRef])
|
|
92
|
+
], TasksModule);
|
|
93
|
+
export { TasksModule };
|
|
93
94
|
//# sourceMappingURL=tasks.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.module.js","sourceRoot":"","sources":["../src/tasks.module.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAc,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAU,WAAW,EAAE,YAAY,EAAe,MAAM,mBAAmB,CAAC;AAEnF,OAAO,EAAqB,oBAAoB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACvG,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OA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