@alterior/tasks 3.13.3 → 3.13.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/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/tasks.js
CHANGED
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TaskWorkerRegistry = exports.TaskQueueClient = exports.TaskWorkerProxy = exports.Worker = exports.Task = exports.TaskAnnotation = exports.QUEUE_OPTIONS = exports.TaskModuleOptionsRef = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const annotations_1 = require("@alterior/annotations");
|
|
6
|
-
const di_1 = require("@alterior/di");
|
|
7
|
-
const bull_1 = tslib_1.__importDefault(require("bull"));
|
|
8
|
-
/**
|
|
9
|
-
* This injectable allows configuration of the task system.
|
|
10
|
-
* Include a provider for the injection token `QUEUE_OPTIONS`
|
|
11
|
-
* which provides an instance of this class.
|
|
12
|
-
*
|
|
13
|
-
* For instance: `[ provide: QUEUE_OPTIONS, useValue: new TaskClientOptionsRef({ optionsHere }) ]`
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
let TaskModuleOptionsRef = class TaskModuleOptionsRef {
|
|
17
|
-
constructor(options) {
|
|
18
|
-
this.options = options;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
TaskModuleOptionsRef =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
exports.QUEUE_OPTIONS = new di_1.InjectionToken('QueueOptions');
|
|
27
|
-
let TaskAnnotation = class TaskAnnotation extends annotations_1.Annotation {
|
|
28
|
-
constructor(id) {
|
|
29
|
-
super();
|
|
30
|
-
this.id = id;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
TaskAnnotation =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
exports.Task = TaskAnnotation.decorator();
|
|
39
|
-
class Worker {
|
|
40
|
-
get options() { return undefined; }
|
|
41
|
-
get currentJob() {
|
|
42
|
-
return Zone.current.get('workerStateJob');
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.Worker = Worker;
|
|
46
|
-
class TaskWorkerProxy {
|
|
47
|
-
static create(handler) {
|
|
48
|
-
return new Proxy({}, {
|
|
49
|
-
get(t, key, receiver) {
|
|
50
|
-
return (...args) => handler(key, ...args);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
static createAsync(queueClient, id, options) {
|
|
55
|
-
return this.create((method, ...args) => {
|
|
56
|
-
if (method === 'withOptions')
|
|
57
|
-
return TaskWorkerProxy.createAsync(queueClient, id, Object.assign({}, options, args[0]));
|
|
58
|
-
else
|
|
59
|
-
return queueClient.enqueue({ id, method, args }, options);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
static createSync(queueClient, id, options) {
|
|
63
|
-
return this.create((method, ...args) => {
|
|
64
|
-
if (method === 'withOptions')
|
|
65
|
-
return TaskWorkerProxy.createSync(queueClient, id, Object.assign({}, options, args[0]));
|
|
66
|
-
else
|
|
67
|
-
return queueClient.enqueue({ id, method, args }, options).then(v => v.finished);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
exports.TaskWorkerProxy = TaskWorkerProxy;
|
|
72
|
-
let TaskQueueClient = class TaskQueueClient {
|
|
73
|
-
constructor(optionsRef) {
|
|
74
|
-
this.optionsRef = optionsRef;
|
|
75
|
-
this._queue = new bull_1.default(this.queueName, this.queueOptions);
|
|
76
|
-
}
|
|
77
|
-
get queue() {
|
|
78
|
-
return this._queue;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Get the task client options. See
|
|
82
|
-
*/
|
|
83
|
-
get options() {
|
|
84
|
-
return (this.optionsRef ? this.optionsRef.options : undefined) || {};
|
|
85
|
-
}
|
|
86
|
-
get queueName() {
|
|
87
|
-
return this.options.queueName || 'alteriorTasks';
|
|
88
|
-
}
|
|
89
|
-
get queueOptions() {
|
|
90
|
-
let queueOptions = Object.assign({}, this.options.queueOptions);
|
|
91
|
-
if (!queueOptions.redis) {
|
|
92
|
-
queueOptions.redis = {
|
|
93
|
-
port: 6379,
|
|
94
|
-
host: '127.0.0.1',
|
|
95
|
-
db: 6
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
return queueOptions;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Enqueue a new task. To handle the task on the worker side, register for it with `.process()`
|
|
102
|
-
*/
|
|
103
|
-
enqueue(data, opts) {
|
|
104
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
return yield this._queue.add(data, opts);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
TaskQueueClient =
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
tslib_1.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
let TaskWorkerRegistry = class TaskWorkerRegistry {
|
|
116
|
-
constructor(injector, client) {
|
|
117
|
-
this.injector = injector;
|
|
118
|
-
this.client = client;
|
|
119
|
-
this._entries = {};
|
|
120
|
-
}
|
|
121
|
-
registerClass(injector, taskClass) {
|
|
122
|
-
let instance = injector.get(taskClass);
|
|
123
|
-
let id = instance.name;
|
|
124
|
-
if (this._entries[id])
|
|
125
|
-
throw new Error(`Another worker is already registered with name '${id}'`);
|
|
126
|
-
this._entries[id] = {
|
|
127
|
-
type: taskClass,
|
|
128
|
-
local: instance,
|
|
129
|
-
sync: TaskWorkerProxy.createSync(this.client, id, instance.options),
|
|
130
|
-
async: TaskWorkerProxy.createAsync(this.client, id, instance.options)
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
get all() {
|
|
134
|
-
return Object.values(this._entries);
|
|
135
|
-
}
|
|
136
|
-
get(cls) {
|
|
137
|
-
let entry = this.all.find(x => x.type === cls);
|
|
138
|
-
if (!entry)
|
|
139
|
-
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})`);
|
|
140
|
-
return entry;
|
|
141
|
-
}
|
|
142
|
-
getByName(name) {
|
|
143
|
-
return this._entries[name];
|
|
144
|
-
}
|
|
145
|
-
registerClasses(classes) {
|
|
146
|
-
let taskClasses = classes;
|
|
147
|
-
let ownInjector = di_1.ReflectiveInjector.resolveAndCreate(taskClasses, this.injector);
|
|
148
|
-
taskClasses.forEach(taskClass => this.registerClass(ownInjector, taskClass));
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
TaskWorkerRegistry =
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
]
|
|
156
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskWorkerRegistry = exports.TaskQueueClient = exports.TaskWorkerProxy = exports.Worker = exports.Task = exports.TaskAnnotation = exports.QUEUE_OPTIONS = exports.TaskModuleOptionsRef = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const annotations_1 = require("@alterior/annotations");
|
|
6
|
+
const di_1 = require("@alterior/di");
|
|
7
|
+
const bull_1 = tslib_1.__importDefault(require("bull"));
|
|
8
|
+
/**
|
|
9
|
+
* This injectable allows configuration of the task system.
|
|
10
|
+
* Include a provider for the injection token `QUEUE_OPTIONS`
|
|
11
|
+
* which provides an instance of this class.
|
|
12
|
+
*
|
|
13
|
+
* For instance: `[ provide: QUEUE_OPTIONS, useValue: new TaskClientOptionsRef({ optionsHere }) ]`
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
let TaskModuleOptionsRef = class TaskModuleOptionsRef {
|
|
17
|
+
constructor(options) {
|
|
18
|
+
this.options = options;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.TaskModuleOptionsRef = TaskModuleOptionsRef;
|
|
22
|
+
exports.TaskModuleOptionsRef = TaskModuleOptionsRef = tslib_1.__decorate([
|
|
23
|
+
(0, di_1.Injectable)(),
|
|
24
|
+
tslib_1.__metadata("design:paramtypes", [Object])
|
|
25
|
+
], TaskModuleOptionsRef);
|
|
26
|
+
exports.QUEUE_OPTIONS = new di_1.InjectionToken('QueueOptions');
|
|
27
|
+
let TaskAnnotation = class TaskAnnotation extends annotations_1.Annotation {
|
|
28
|
+
constructor(id) {
|
|
29
|
+
super();
|
|
30
|
+
this.id = id;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.TaskAnnotation = TaskAnnotation;
|
|
34
|
+
exports.TaskAnnotation = TaskAnnotation = tslib_1.__decorate([
|
|
35
|
+
(0, annotations_1.MetadataName)('@alterior/tasks:Task'),
|
|
36
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
37
|
+
], TaskAnnotation);
|
|
38
|
+
exports.Task = TaskAnnotation.decorator();
|
|
39
|
+
class Worker {
|
|
40
|
+
get options() { return undefined; }
|
|
41
|
+
get currentJob() {
|
|
42
|
+
return Zone.current.get('workerStateJob');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Worker = Worker;
|
|
46
|
+
class TaskWorkerProxy {
|
|
47
|
+
static create(handler) {
|
|
48
|
+
return new Proxy({}, {
|
|
49
|
+
get(t, key, receiver) {
|
|
50
|
+
return (...args) => handler(key, ...args);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
static createAsync(queueClient, id, options) {
|
|
55
|
+
return this.create((method, ...args) => {
|
|
56
|
+
if (method === 'withOptions')
|
|
57
|
+
return TaskWorkerProxy.createAsync(queueClient, id, Object.assign({}, options, args[0]));
|
|
58
|
+
else
|
|
59
|
+
return queueClient.enqueue({ id, method, args }, options);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
static createSync(queueClient, id, options) {
|
|
63
|
+
return this.create((method, ...args) => {
|
|
64
|
+
if (method === 'withOptions')
|
|
65
|
+
return TaskWorkerProxy.createSync(queueClient, id, Object.assign({}, options, args[0]));
|
|
66
|
+
else
|
|
67
|
+
return queueClient.enqueue({ id, method, args }, options).then(v => v.finished);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.TaskWorkerProxy = TaskWorkerProxy;
|
|
72
|
+
let TaskQueueClient = class TaskQueueClient {
|
|
73
|
+
constructor(optionsRef) {
|
|
74
|
+
this.optionsRef = optionsRef;
|
|
75
|
+
this._queue = new bull_1.default(this.queueName, this.queueOptions);
|
|
76
|
+
}
|
|
77
|
+
get queue() {
|
|
78
|
+
return this._queue;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Get the task client options. See
|
|
82
|
+
*/
|
|
83
|
+
get options() {
|
|
84
|
+
return (this.optionsRef ? this.optionsRef.options : undefined) || {};
|
|
85
|
+
}
|
|
86
|
+
get queueName() {
|
|
87
|
+
return this.options.queueName || 'alteriorTasks';
|
|
88
|
+
}
|
|
89
|
+
get queueOptions() {
|
|
90
|
+
let queueOptions = Object.assign({}, this.options.queueOptions);
|
|
91
|
+
if (!queueOptions.redis) {
|
|
92
|
+
queueOptions.redis = {
|
|
93
|
+
port: 6379,
|
|
94
|
+
host: '127.0.0.1',
|
|
95
|
+
db: 6
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
return queueOptions;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Enqueue a new task. To handle the task on the worker side, register for it with `.process()`
|
|
102
|
+
*/
|
|
103
|
+
enqueue(data, opts) {
|
|
104
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
return yield this._queue.add(data, opts);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
exports.TaskQueueClient = TaskQueueClient;
|
|
110
|
+
exports.TaskQueueClient = TaskQueueClient = tslib_1.__decorate([
|
|
111
|
+
(0, di_1.Injectable)(),
|
|
112
|
+
tslib_1.__param(0, (0, di_1.Optional)()),
|
|
113
|
+
tslib_1.__metadata("design:paramtypes", [TaskModuleOptionsRef])
|
|
114
|
+
], TaskQueueClient);
|
|
115
|
+
let TaskWorkerRegistry = class TaskWorkerRegistry {
|
|
116
|
+
constructor(injector, client) {
|
|
117
|
+
this.injector = injector;
|
|
118
|
+
this.client = client;
|
|
119
|
+
this._entries = {};
|
|
120
|
+
}
|
|
121
|
+
registerClass(injector, taskClass) {
|
|
122
|
+
let instance = injector.get(taskClass);
|
|
123
|
+
let id = instance.name;
|
|
124
|
+
if (this._entries[id])
|
|
125
|
+
throw new Error(`Another worker is already registered with name '${id}'`);
|
|
126
|
+
this._entries[id] = {
|
|
127
|
+
type: taskClass,
|
|
128
|
+
local: instance,
|
|
129
|
+
sync: TaskWorkerProxy.createSync(this.client, id, instance.options),
|
|
130
|
+
async: TaskWorkerProxy.createAsync(this.client, id, instance.options)
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
get all() {
|
|
134
|
+
return Object.values(this._entries);
|
|
135
|
+
}
|
|
136
|
+
get(cls) {
|
|
137
|
+
let entry = this.all.find(x => x.type === cls);
|
|
138
|
+
if (!entry)
|
|
139
|
+
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})`);
|
|
140
|
+
return entry;
|
|
141
|
+
}
|
|
142
|
+
getByName(name) {
|
|
143
|
+
return this._entries[name];
|
|
144
|
+
}
|
|
145
|
+
registerClasses(classes) {
|
|
146
|
+
let taskClasses = classes;
|
|
147
|
+
let ownInjector = di_1.ReflectiveInjector.resolveAndCreate(taskClasses, this.injector);
|
|
148
|
+
taskClasses.forEach(taskClass => this.registerClass(ownInjector, taskClass));
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
exports.TaskWorkerRegistry = TaskWorkerRegistry;
|
|
152
|
+
exports.TaskWorkerRegistry = TaskWorkerRegistry = tslib_1.__decorate([
|
|
153
|
+
(0, di_1.Injectable)(),
|
|
154
|
+
tslib_1.__metadata("design:paramtypes", [di_1.Injector,
|
|
155
|
+
TaskQueueClient])
|
|
156
|
+
], TaskWorkerRegistry);
|
|
157
157
|
//# sourceMappingURL=tasks.js.map
|
package/dist/tasks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../src/tasks.ts"],"names":[],"mappings":";;;;AAAA,uDAAsF;AACtF,qCAA4G;AAC5G,wDAA6B;AAQ7B;;;;;;;GAOG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC7B,YAAY,OAA2B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;QAChG,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;IACjF,CAAC;CACJ,CAAA;AA/CY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,eAAU,GAAE;6CAGc,aAAQ;QACV,eAAe;GAH3B,kBAAkB,CA+C9B"}
|
package/dist/tasks.module.d.ts
CHANGED
|
@@ -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/tasks.module.js
CHANGED
|
@@ -1,96 +1,97 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var TasksModule_1;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.TasksModule = void 0;
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
|
-
const di_1 = require("@alterior/di");
|
|
7
|
-
const runtime_1 = require("@alterior/runtime");
|
|
8
|
-
const tasks_1 = require("./tasks");
|
|
9
|
-
const task_runner_1 = require("./task-runner");
|
|
10
|
-
const task_worker_1 = require("./task-worker");
|
|
11
|
-
const logging_1 = require("@alterior/logging");
|
|
12
|
-
/**
|
|
13
|
-
* Import this into your application module to run tasks enqueued by other
|
|
14
|
-
* services on a shared queue. The tasks which can be processed are specified
|
|
15
|
-
* in the `tasks` field of one or more modules.
|
|
16
|
-
*/
|
|
17
|
-
let TasksModule = TasksModule_1 = class TasksModule {
|
|
18
|
-
constructor(app, rolesService, client, workerRegistry, logger, _options) {
|
|
19
|
-
this.app = app;
|
|
20
|
-
this.rolesService = rolesService;
|
|
21
|
-
this.client = client;
|
|
22
|
-
this.workerRegistry = workerRegistry;
|
|
23
|
-
this.logger = logger;
|
|
24
|
-
this._options = _options;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Used when importing this module from the root (app) module
|
|
28
|
-
* using the default configuration.
|
|
29
|
-
* Should be called only once in the application.
|
|
30
|
-
*/
|
|
31
|
-
static forRoot() {
|
|
32
|
-
return this.configure({});
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Create a configured version of the WebServerModule that can be then
|
|
36
|
-
* be imported into an entry module (or feature module).
|
|
37
|
-
* @param options The options to use for the web server
|
|
38
|
-
*/
|
|
39
|
-
static configure(options) {
|
|
40
|
-
return {
|
|
41
|
-
$module: TasksModule_1,
|
|
42
|
-
providers: [
|
|
43
|
-
{ provide: tasks_1.TaskModuleOptionsRef, useValue: new tasks_1.TaskModuleOptionsRef(options) }
|
|
44
|
-
]
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
get options() {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
this.
|
|
56
|
-
this.worker.
|
|
57
|
-
|
|
58
|
-
this
|
|
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
|
-
|
|
93
|
-
tasks_1.
|
|
94
|
-
|
|
95
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var TasksModule_1;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TasksModule = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const di_1 = require("@alterior/di");
|
|
7
|
+
const runtime_1 = require("@alterior/runtime");
|
|
8
|
+
const tasks_1 = require("./tasks");
|
|
9
|
+
const task_runner_1 = require("./task-runner");
|
|
10
|
+
const task_worker_1 = require("./task-worker");
|
|
11
|
+
const logging_1 = require("@alterior/logging");
|
|
12
|
+
/**
|
|
13
|
+
* Import this into your application module to run tasks enqueued by other
|
|
14
|
+
* services on a shared queue. The tasks which can be processed are specified
|
|
15
|
+
* in the `tasks` field of one or more modules.
|
|
16
|
+
*/
|
|
17
|
+
let TasksModule = TasksModule_1 = class TasksModule {
|
|
18
|
+
constructor(app, rolesService, client, workerRegistry, logger, _options) {
|
|
19
|
+
this.app = app;
|
|
20
|
+
this.rolesService = rolesService;
|
|
21
|
+
this.client = client;
|
|
22
|
+
this.workerRegistry = workerRegistry;
|
|
23
|
+
this.logger = logger;
|
|
24
|
+
this._options = _options;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Used when importing this module from the root (app) module
|
|
28
|
+
* using the default configuration.
|
|
29
|
+
* Should be called only once in the application.
|
|
30
|
+
*/
|
|
31
|
+
static forRoot() {
|
|
32
|
+
return this.configure({});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Create a configured version of the WebServerModule that can be then
|
|
36
|
+
* be imported into an entry module (or feature module).
|
|
37
|
+
* @param options The options to use for the web server
|
|
38
|
+
*/
|
|
39
|
+
static configure(options) {
|
|
40
|
+
return {
|
|
41
|
+
$module: TasksModule_1,
|
|
42
|
+
providers: [
|
|
43
|
+
{ provide: tasks_1.TaskModuleOptionsRef, useValue: new tasks_1.TaskModuleOptionsRef(options) }
|
|
44
|
+
]
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
get options() {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
return (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.options) !== null && _b !== void 0 ? _b : {};
|
|
50
|
+
}
|
|
51
|
+
get tasks() {
|
|
52
|
+
return [].concat(...this.app.runtime.definitions.map(x => x.metadata.tasks || []));
|
|
53
|
+
}
|
|
54
|
+
altOnInit() {
|
|
55
|
+
this.workerRegistry.registerClasses(this.tasks);
|
|
56
|
+
this.worker = new task_worker_1.TaskWorker(this.app.runtime.injector, this.client, this.options, this.app.options, this.logger);
|
|
57
|
+
this.worker.registerClasses(this.tasks);
|
|
58
|
+
let self = this;
|
|
59
|
+
this.rolesService.registerRole({
|
|
60
|
+
identifier: 'task-worker',
|
|
61
|
+
instance: this,
|
|
62
|
+
name: 'Task Worker',
|
|
63
|
+
summary: 'Pulls from the task queue and executes them using task classes registered in the module tree',
|
|
64
|
+
start() {
|
|
65
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
self.worker.start();
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
stop() {
|
|
70
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
self.worker.stop();
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
exports.TasksModule = TasksModule;
|
|
78
|
+
exports.TasksModule = TasksModule = TasksModule_1 = tslib_1.__decorate([
|
|
79
|
+
(0, di_1.Module)({
|
|
80
|
+
providers: [
|
|
81
|
+
tasks_1.TaskQueueClient,
|
|
82
|
+
tasks_1.TaskWorkerRegistry,
|
|
83
|
+
task_runner_1.TaskRunner
|
|
84
|
+
],
|
|
85
|
+
imports: [
|
|
86
|
+
logging_1.LoggingModule
|
|
87
|
+
]
|
|
88
|
+
}),
|
|
89
|
+
tslib_1.__param(5, (0, di_1.Optional)()),
|
|
90
|
+
tslib_1.__metadata("design:paramtypes", [runtime_1.Application,
|
|
91
|
+
runtime_1.RolesService,
|
|
92
|
+
tasks_1.TaskQueueClient,
|
|
93
|
+
tasks_1.TaskWorkerRegistry,
|
|
94
|
+
logging_1.Logger,
|
|
95
|
+
tasks_1.TaskModuleOptionsRef])
|
|
96
|
+
], TasksModule);
|
|
96
97
|
//# sourceMappingURL=tasks.module.js.map
|
package/dist/tasks.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.module.js","sourceRoot":"","sources":["../src/tasks.module.ts"],"names":[],"mappings":";;;;;AAAA,qCAA4D;AAC5D,+CAAmF;AAEnF,mCAAuG;AACvG,+CAA2C;AAC3C,+CAA2C;AAC3C,+CAA0D;AAE1D;;;;GAIG;AAWI,IAAM,WAAW,mBAAjB,MAAM,WAAW;IACpB,YACY,GAAiB,EACjB,YAA2B,EAC3B,MAAwB,EACxB,cAAmC,EACnC,MAAe,EACH,QAA+B;QAL3C,QAAG,GAAH,GAAG,CAAc;QACjB,iBAAY,GAAZ,YAAY,CAAe;QAC3B,WAAM,GAAN,MAAM,CAAkB;QACxB,mBAAc,GAAd,cAAc,CAAqB;QACnC,WAAM,GAAN,MAAM,CAAS;QACH,aAAQ,GAAR,QAAQ,CAAuB;IAGvD,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,OAAO;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,SAAS,CAAC,OAA2B;QAC/C,OAAO;YACH,OAAO,EAAE,aAAW;YACpB,SAAS,EAAE;gBACP,EAAE,OAAO,EAAE,4BAAoB,EAAE,QAAQ,EAAE,IAAI,4BAAoB,CAAC,OAAO,CAAC,EAAE;aACjF;SACJ,CAAA;IACL,CAAC;IAID,IAAI,OAAO
|
|
1
|
+
{"version":3,"file":"tasks.module.js","sourceRoot":"","sources":["../src/tasks.module.ts"],"names":[],"mappings":";;;;;AAAA,qCAA4D;AAC5D,+CAAmF;AAEnF,mCAAuG;AACvG,+CAA2C;AAC3C,+CAA2C;AAC3C,+CAA0D;AAE1D;;;;GAIG;AAWI,IAAM,WAAW,mBAAjB,MAAM,WAAW;IACpB,YACY,GAAiB,EACj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CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAExC,IAAI,IAAI,GAAG,IAAI,CAAC;QAEhB,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC;YAC3B,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE,8FAA8F;YACjG,KAAK;;oBACP,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;gBACxB,CAAC;aAAA;YAEK,IAAI;;oBACN,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBACvB,CAAC;aAAA;SACJ,CAAC,CAAA;IAEN,CAAC;CACJ,CAAA;AA3EY,kCAAW;sBAAX,WAAW;IAVvB,IAAA,WAAM,EAAC;QACJ,SAAS,EAAE;YACP,uBAAe;YACf,0BAAkB;YAClB,wBAAU;SACb;QACD,OAAO,EAAE;YACL,uBAAa;SAChB;KACJ,CAAC;IAQO,mBAAA,IAAA,aAAQ,GAAE,CAAA;6CALG,qBAAW;QACF,sBAAY;QAClB,uBAAe;QACP,0BAAkB;QAC1B,gBAAM;QACQ,4BAAoB;GAP9C,WAAW,CA2EvB"}
|
package/dist/test.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "reflect-metadata";
|
|
1
|
+
import "reflect-metadata";
|
|
2
2
|
//# sourceMappingURL=test.d.ts.map
|
package/dist.esm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './tasks';
|
|
2
|
-
export * from './task-runner';
|
|
3
|
-
export * from './task-worker';
|
|
4
|
-
export * from './tasks.module';
|
|
1
|
+
export * from './tasks';
|
|
2
|
+
export * from './task-runner';
|
|
3
|
+
export * from './task-worker';
|
|
4
|
+
export * from './tasks.module';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|