@spinajs/queue 2.0.180 → 2.0.182
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/lib/cjs/BlackHoleQueueClient.d.ts +11 -11
- package/lib/cjs/BlackHoleQueueClient.js +29 -29
- package/lib/cjs/BlackHoleQueueClient.js.map +1 -1
- package/lib/cjs/config/queue.d.ts +10 -10
- package/lib/cjs/config/queue.js +17 -17
- package/lib/cjs/decorators.d.ts +19 -19
- package/lib/cjs/decorators.js +35 -35
- package/lib/cjs/index.d.ts +38 -38
- package/lib/cjs/index.js +167 -167
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/interfaces.d.ts +213 -213
- package/lib/cjs/interfaces.js +168 -168
- package/lib/cjs/interfaces.js.map +1 -1
- package/lib/cjs/migrations/Queue_2022_10_18_01_13_00.d.ts +5 -5
- package/lib/cjs/migrations/Queue_2022_10_18_01_13_00.js +35 -35
- package/lib/cjs/migrations/Queue_2022_10_18_01_13_00.js.map +1 -1
- package/lib/cjs/models/JobModel.d.ts +19 -19
- package/lib/cjs/models/JobModel.js +46 -46
- package/lib/cjs/models/JobModel.js.map +1 -1
- package/lib/mjs/BlackHoleQueueClient.d.ts +11 -11
- package/lib/mjs/BlackHoleQueueClient.js +26 -26
- package/lib/mjs/BlackHoleQueueClient.js.map +1 -1
- package/lib/mjs/config/queue.d.ts +10 -10
- package/lib/mjs/config/queue.js +15 -15
- package/lib/mjs/decorators.d.ts +19 -19
- package/lib/mjs/decorators.js +30 -30
- package/lib/mjs/index.d.ts +38 -38
- package/lib/mjs/index.js +150 -150
- package/lib/mjs/index.js.map +1 -1
- package/lib/mjs/interfaces.d.ts +213 -213
- package/lib/mjs/interfaces.js +156 -156
- package/lib/mjs/interfaces.js.map +1 -1
- package/lib/mjs/migrations/Queue_2022_10_18_01_13_00.d.ts +5 -5
- package/lib/mjs/migrations/Queue_2022_10_18_01_13_00.js +32 -32
- package/lib/mjs/migrations/Queue_2022_10_18_01_13_00.js.map +1 -1
- package/lib/mjs/models/JobModel.d.ts +19 -19
- package/lib/mjs/models/JobModel.js +43 -43
- package/lib/mjs/models/JobModel.js.map +1 -1
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/tsconfig.mjs.tsbuildinfo +1 -1
- package/package.json +6 -6
package/lib/mjs/interfaces.js
CHANGED
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { AsyncService, DI } from '@spinajs/di';
|
|
11
|
-
import { DateTime } from 'luxon';
|
|
12
|
-
import _ from 'lodash';
|
|
13
|
-
import { Log, Logger } from '@spinajs/log';
|
|
14
|
-
import { Config } from '@spinajs/configuration';
|
|
15
|
-
export var QueueMessageType;
|
|
16
|
-
(function (QueueMessageType) {
|
|
17
|
-
QueueMessageType["Job"] = "JOB";
|
|
18
|
-
QueueMessageType["Event"] = "EVENT";
|
|
19
|
-
})(QueueMessageType
|
|
20
|
-
export class QueueService extends AsyncService {
|
|
21
|
-
getConnectionsForMessage(event) {
|
|
22
|
-
const option = this.Configuration.routing[event.Name ?? event.name] ?? this.Configuration.default;
|
|
23
|
-
if (_.isString(option)) {
|
|
24
|
-
return [this.Configuration.default];
|
|
25
|
-
}
|
|
26
|
-
if (_.isArray(option)) {
|
|
27
|
-
return _.uniq(option.map((x) => {
|
|
28
|
-
if (_.isString(x)) {
|
|
29
|
-
return this.Configuration.default;
|
|
30
|
-
}
|
|
31
|
-
if (x.connection) {
|
|
32
|
-
return x.connection;
|
|
33
|
-
}
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
__decorate([
|
|
39
|
-
Config('queue'),
|
|
40
|
-
__metadata("design:type", Object)
|
|
41
|
-
], QueueService.prototype, "Configuration", void 0);
|
|
42
|
-
export function isJob(event) {
|
|
43
|
-
return event.Type === QueueMessageType.Job;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Events are messages send via queue, we do not want to track it, dont care about result, no retry policy on failed execution etc.
|
|
47
|
-
*/
|
|
48
|
-
export class QueueMessage {
|
|
49
|
-
constructor() {
|
|
50
|
-
this.CreatedAt = DateTime.now();
|
|
51
|
-
}
|
|
52
|
-
hydrate(payload) {
|
|
53
|
-
Object.assign(this, payload);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* events provides a simple observer implementation, allowing you to subscribe and listen
|
|
58
|
-
* for various events that occur in your application. Events serve as a great way to decouple
|
|
59
|
-
* various aspects of your application, since a single event can have multiple listeners that do not depend on each other.
|
|
60
|
-
*
|
|
61
|
-
* we can register multiple listeners for a single event and the event helper will dispatch the event to all of its registered
|
|
62
|
-
* listeners without us calling them explicitly. where in case of Jobs we would have to call them each one explicitly.
|
|
63
|
-
*/
|
|
64
|
-
export class QueueEvent extends QueueMessage {
|
|
65
|
-
constructor() {
|
|
66
|
-
super();
|
|
67
|
-
this.Type = QueueMessageType.Event;
|
|
68
|
-
}
|
|
69
|
-
static async emit(val, options) {
|
|
70
|
-
const queue = await DI.resolve(QueueService);
|
|
71
|
-
const message = {
|
|
72
|
-
...val,
|
|
73
|
-
Type: QueueMessageType.Event,
|
|
74
|
-
CreatedAt: val.CreatedAt ?? DateTime.now(),
|
|
75
|
-
Name: this.name,
|
|
76
|
-
...options,
|
|
77
|
-
};
|
|
78
|
-
// partial of queue job always is queue message
|
|
79
|
-
await queue.emit(message);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Jobs are executed only once even if multiple listeners waiting for it. usually used for single method call
|
|
84
|
-
* or time consuming tasks, that need to checked for result and tracked
|
|
85
|
-
*
|
|
86
|
-
* Job results are preserved
|
|
87
|
-
*/
|
|
88
|
-
export class QueueJob extends QueueMessage {
|
|
89
|
-
constructor() {
|
|
90
|
-
super();
|
|
91
|
-
this.Type = QueueMessageType.Job;
|
|
92
|
-
this.Name = this.constructor.name;
|
|
93
|
-
}
|
|
94
|
-
static async emit(val, options) {
|
|
95
|
-
const queue = await DI.resolve(QueueService);
|
|
96
|
-
const message = {
|
|
97
|
-
...val,
|
|
98
|
-
Type: QueueMessageType.Job,
|
|
99
|
-
CreatedAt: val.CreatedAt ?? DateTime.now(),
|
|
100
|
-
Name: this.name,
|
|
101
|
-
...options,
|
|
102
|
-
};
|
|
103
|
-
// partial of queue job always is queue message
|
|
104
|
-
await queue.emit(message);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
export class QueueClient extends AsyncService {
|
|
108
|
-
get Name() {
|
|
109
|
-
return this.Options.name;
|
|
110
|
-
}
|
|
111
|
-
get ServiceName() {
|
|
112
|
-
return this.Options.name;
|
|
113
|
-
}
|
|
114
|
-
constructor(Options) {
|
|
115
|
-
super();
|
|
116
|
-
this.Options = Options;
|
|
117
|
-
}
|
|
118
|
-
__checkInstance__(creationOptions) {
|
|
119
|
-
return this.Options.name === creationOptions[0].name;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
*
|
|
123
|
-
* Gets event channel from routing table or default if non is set
|
|
124
|
-
*
|
|
125
|
-
* @param event - event to check
|
|
126
|
-
*/
|
|
127
|
-
getChannelForMessage(event) {
|
|
128
|
-
const options = Reflect.getMetadata('queue:options', event);
|
|
129
|
-
const eName = event.Name ?? event.name;
|
|
130
|
-
const isJob = event.Type ? event.Type === QueueMessageType.Job : options ? options.type === 'job' : false;
|
|
131
|
-
const rOption = this.Routing[eName];
|
|
132
|
-
if (!rOption) {
|
|
133
|
-
return [isJob ? this.Options.defaultQueueChannel : this.Options.defaultTopicChannel];
|
|
134
|
-
}
|
|
135
|
-
if (_.isString(rOption)) {
|
|
136
|
-
return [rOption];
|
|
137
|
-
}
|
|
138
|
-
if (_.isArray(rOption)) {
|
|
139
|
-
return _.uniq(rOption.map((x) => {
|
|
140
|
-
if (_.isString(x)) {
|
|
141
|
-
return x;
|
|
142
|
-
}
|
|
143
|
-
return x.channel ?? isJob ? this.Options.defaultQueueChannel : this.Options.defaultTopicChannel;
|
|
144
|
-
}));
|
|
145
|
-
}
|
|
146
|
-
return [rOption.channel ?? isJob ? this.Options.defaultQueueChannel : this.Options.defaultTopicChannel];
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
__decorate([
|
|
150
|
-
Logger('queue'),
|
|
151
|
-
__metadata("design:type", Log)
|
|
152
|
-
], QueueClient.prototype, "Log", void 0);
|
|
153
|
-
__decorate([
|
|
154
|
-
Config('queue.routing'),
|
|
155
|
-
__metadata("design:type", Object)
|
|
156
|
-
], QueueClient.prototype, "Routing", void 0);
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { AsyncService, DI } from '@spinajs/di';
|
|
11
|
+
import { DateTime } from 'luxon';
|
|
12
|
+
import _ from 'lodash';
|
|
13
|
+
import { Log, Logger } from '@spinajs/log';
|
|
14
|
+
import { Config } from '@spinajs/configuration';
|
|
15
|
+
export var QueueMessageType;
|
|
16
|
+
(function (QueueMessageType) {
|
|
17
|
+
QueueMessageType["Job"] = "JOB";
|
|
18
|
+
QueueMessageType["Event"] = "EVENT";
|
|
19
|
+
})(QueueMessageType || (QueueMessageType = {}));
|
|
20
|
+
export class QueueService extends AsyncService {
|
|
21
|
+
getConnectionsForMessage(event) {
|
|
22
|
+
const option = this.Configuration.routing[event.Name ?? event.name] ?? this.Configuration.default;
|
|
23
|
+
if (_.isString(option)) {
|
|
24
|
+
return [this.Configuration.default];
|
|
25
|
+
}
|
|
26
|
+
if (_.isArray(option)) {
|
|
27
|
+
return _.uniq(option.map((x) => {
|
|
28
|
+
if (_.isString(x)) {
|
|
29
|
+
return this.Configuration.default;
|
|
30
|
+
}
|
|
31
|
+
if (x.connection) {
|
|
32
|
+
return x.connection;
|
|
33
|
+
}
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
__decorate([
|
|
39
|
+
Config('queue'),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], QueueService.prototype, "Configuration", void 0);
|
|
42
|
+
export function isJob(event) {
|
|
43
|
+
return event.Type === QueueMessageType.Job;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Events are messages send via queue, we do not want to track it, dont care about result, no retry policy on failed execution etc.
|
|
47
|
+
*/
|
|
48
|
+
export class QueueMessage {
|
|
49
|
+
constructor() {
|
|
50
|
+
this.CreatedAt = DateTime.now();
|
|
51
|
+
}
|
|
52
|
+
hydrate(payload) {
|
|
53
|
+
Object.assign(this, payload);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* events provides a simple observer implementation, allowing you to subscribe and listen
|
|
58
|
+
* for various events that occur in your application. Events serve as a great way to decouple
|
|
59
|
+
* various aspects of your application, since a single event can have multiple listeners that do not depend on each other.
|
|
60
|
+
*
|
|
61
|
+
* we can register multiple listeners for a single event and the event helper will dispatch the event to all of its registered
|
|
62
|
+
* listeners without us calling them explicitly. where in case of Jobs we would have to call them each one explicitly.
|
|
63
|
+
*/
|
|
64
|
+
export class QueueEvent extends QueueMessage {
|
|
65
|
+
constructor() {
|
|
66
|
+
super();
|
|
67
|
+
this.Type = QueueMessageType.Event;
|
|
68
|
+
}
|
|
69
|
+
static async emit(val, options) {
|
|
70
|
+
const queue = await DI.resolve(QueueService);
|
|
71
|
+
const message = {
|
|
72
|
+
...val,
|
|
73
|
+
Type: QueueMessageType.Event,
|
|
74
|
+
CreatedAt: val.CreatedAt ?? DateTime.now(),
|
|
75
|
+
Name: this.name,
|
|
76
|
+
...options,
|
|
77
|
+
};
|
|
78
|
+
// partial of queue job always is queue message
|
|
79
|
+
await queue.emit(message);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Jobs are executed only once even if multiple listeners waiting for it. usually used for single method call
|
|
84
|
+
* or time consuming tasks, that need to checked for result and tracked
|
|
85
|
+
*
|
|
86
|
+
* Job results are preserved
|
|
87
|
+
*/
|
|
88
|
+
export class QueueJob extends QueueMessage {
|
|
89
|
+
constructor() {
|
|
90
|
+
super();
|
|
91
|
+
this.Type = QueueMessageType.Job;
|
|
92
|
+
this.Name = this.constructor.name;
|
|
93
|
+
}
|
|
94
|
+
static async emit(val, options) {
|
|
95
|
+
const queue = await DI.resolve(QueueService);
|
|
96
|
+
const message = {
|
|
97
|
+
...val,
|
|
98
|
+
Type: QueueMessageType.Job,
|
|
99
|
+
CreatedAt: val.CreatedAt ?? DateTime.now(),
|
|
100
|
+
Name: this.name,
|
|
101
|
+
...options,
|
|
102
|
+
};
|
|
103
|
+
// partial of queue job always is queue message
|
|
104
|
+
await queue.emit(message);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
export class QueueClient extends AsyncService {
|
|
108
|
+
get Name() {
|
|
109
|
+
return this.Options.name;
|
|
110
|
+
}
|
|
111
|
+
get ServiceName() {
|
|
112
|
+
return this.Options.name;
|
|
113
|
+
}
|
|
114
|
+
constructor(Options) {
|
|
115
|
+
super();
|
|
116
|
+
this.Options = Options;
|
|
117
|
+
}
|
|
118
|
+
__checkInstance__(creationOptions) {
|
|
119
|
+
return this.Options.name === creationOptions[0].name;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
* Gets event channel from routing table or default if non is set
|
|
124
|
+
*
|
|
125
|
+
* @param event - event to check
|
|
126
|
+
*/
|
|
127
|
+
getChannelForMessage(event) {
|
|
128
|
+
const options = Reflect.getMetadata('queue:options', event);
|
|
129
|
+
const eName = event.Name ?? event.name;
|
|
130
|
+
const isJob = event.Type ? event.Type === QueueMessageType.Job : options ? options.type === 'job' : false;
|
|
131
|
+
const rOption = this.Routing[eName];
|
|
132
|
+
if (!rOption) {
|
|
133
|
+
return [isJob ? this.Options.defaultQueueChannel : this.Options.defaultTopicChannel];
|
|
134
|
+
}
|
|
135
|
+
if (_.isString(rOption)) {
|
|
136
|
+
return [rOption];
|
|
137
|
+
}
|
|
138
|
+
if (_.isArray(rOption)) {
|
|
139
|
+
return _.uniq(rOption.map((x) => {
|
|
140
|
+
if (_.isString(x)) {
|
|
141
|
+
return x;
|
|
142
|
+
}
|
|
143
|
+
return x.channel ?? isJob ? this.Options.defaultQueueChannel : this.Options.defaultTopicChannel;
|
|
144
|
+
}));
|
|
145
|
+
}
|
|
146
|
+
return [rOption.channel ?? isJob ? this.Options.defaultQueueChannel : this.Options.defaultTopicChannel];
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
__decorate([
|
|
150
|
+
Logger('queue'),
|
|
151
|
+
__metadata("design:type", Log)
|
|
152
|
+
], QueueClient.prototype, "Log", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
Config('queue.routing'),
|
|
155
|
+
__metadata("design:type", Object)
|
|
156
|
+
], QueueClient.prototype, "Routing", void 0);
|
|
157
157
|
//# sourceMappingURL=interfaces.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAe,EAAE,EAAoC,MAAM,aAAa,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,mCAAe,CAAA;AACjB,CAAC,EAHW,gBAAgB,
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/interfaces.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAe,EAAE,EAAoC,MAAM,aAAa,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,mCAAe,CAAA;AACjB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAqCD,MAAM,OAAgB,YAAa,SAAQ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gBAED,OAAO,CAAC,CAAC,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC;YAClG,CAAC,CAAC,CACH,CAAC;SACH;QAED,OAAO,CAAC,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1G,CAAC;CACF;AAnFW;IADT,MAAM,CAAC,OAAO,CAAC;8BACD,GAAG;wCAAC;AAGT;IADT,MAAM,CAAC,eAAe,CAAC;;4CACuB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OrmMigration, OrmDriver } from '@spinajs/orm';
|
|
2
|
-
export declare class Queue_2022_10_18_01_13_00 extends OrmMigration {
|
|
3
|
-
up(connection: OrmDriver): Promise<void>;
|
|
4
|
-
down(_connection: OrmDriver): Promise<void>;
|
|
5
|
-
}
|
|
1
|
+
import { OrmMigration, OrmDriver } from '@spinajs/orm';
|
|
2
|
+
export declare class Queue_2022_10_18_01_13_00 extends OrmMigration {
|
|
3
|
+
up(connection: OrmDriver): Promise<void>;
|
|
4
|
+
down(_connection: OrmDriver): Promise<void>;
|
|
5
|
+
}
|
|
6
6
|
//# sourceMappingURL=Queue_2022_10_18_01_13_00.d.ts.map
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
8
|
-
import { OrmMigration, Migration } from '@spinajs/orm';
|
|
9
|
-
let Queue_2022_10_18_01_13_00 = class Queue_2022_10_18_01_13_00 extends OrmMigration {
|
|
10
|
-
async up(connection) {
|
|
11
|
-
await connection.schema().createTable('queue_jobs', (table) => {
|
|
12
|
-
table.int('Id').primaryKey().autoIncrement();
|
|
13
|
-
table.uuid('JobId').notNull();
|
|
14
|
-
table.string('Name', 32).notNull();
|
|
15
|
-
table.string('Result');
|
|
16
|
-
table.enum('Status', ['error', 'success', 'created', 'executing']).notNull().default().value('created');
|
|
17
|
-
table.int('Progress').notNull().default().value(0);
|
|
18
|
-
table.string('Connection').notNull();
|
|
19
|
-
table.timestamp('CreatedAt').notNull().default().dateTime();
|
|
20
|
-
table.timestamp('ExecutedAt');
|
|
21
|
-
table.timestamp('FinishedAt');
|
|
22
|
-
});
|
|
23
|
-
await connection.index().unique().table('queue_jobs').name('queue_jobs_job_id').columns(['JobId']);
|
|
24
|
-
}
|
|
25
|
-
// tslint:disable-next-line: no-empty
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
27
|
-
async down(_connection) { }
|
|
28
|
-
};
|
|
29
|
-
Queue_2022_10_18_01_13_00 = __decorate([
|
|
30
|
-
Migration('queue')
|
|
31
|
-
], Queue_2022_10_18_01_13_00);
|
|
32
|
-
export { Queue_2022_10_18_01_13_00 };
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
8
|
+
import { OrmMigration, Migration } from '@spinajs/orm';
|
|
9
|
+
let Queue_2022_10_18_01_13_00 = class Queue_2022_10_18_01_13_00 extends OrmMigration {
|
|
10
|
+
async up(connection) {
|
|
11
|
+
await connection.schema().createTable('queue_jobs', (table) => {
|
|
12
|
+
table.int('Id').primaryKey().autoIncrement();
|
|
13
|
+
table.uuid('JobId').notNull();
|
|
14
|
+
table.string('Name', 32).notNull();
|
|
15
|
+
table.string('Result');
|
|
16
|
+
table.enum('Status', ['error', 'success', 'created', 'executing']).notNull().default().value('created');
|
|
17
|
+
table.int('Progress').notNull().default().value(0);
|
|
18
|
+
table.string('Connection').notNull();
|
|
19
|
+
table.timestamp('CreatedAt').notNull().default().dateTime();
|
|
20
|
+
table.timestamp('ExecutedAt');
|
|
21
|
+
table.timestamp('FinishedAt');
|
|
22
|
+
});
|
|
23
|
+
await connection.index().unique().table('queue_jobs').name('queue_jobs_job_id').columns(['JobId']);
|
|
24
|
+
}
|
|
25
|
+
// tslint:disable-next-line: no-empty
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
27
|
+
async down(_connection) { }
|
|
28
|
+
};
|
|
29
|
+
Queue_2022_10_18_01_13_00 = __decorate([
|
|
30
|
+
Migration('queue')
|
|
31
|
+
], Queue_2022_10_18_01_13_00);
|
|
32
|
+
export { Queue_2022_10_18_01_13_00 };
|
|
33
33
|
//# sourceMappingURL=Queue_2022_10_18_01_13_00.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Queue_2022_10_18_01_13_00.js","sourceRoot":"","sources":["../../../src/migrations/Queue_2022_10_18_01_13_00.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAsD;AACtD,OAAO,EAAE,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AAC,WAAW,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC;YAC5D,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;YAC9B,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;QAEH,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACrG,CAAC;IAED,qCAAqC;IACrC,gEAAgE;IACzD,KAAK,CAAC,IAAI,CAAC,WAAsB,IAAkB,CAAC;CAC5D,CAAA;AArBY,yBAAyB;IADrC,SAAS,CAAC,OAAO,CAAC;GACN,yBAAyB,CAqBrC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { DateTime } from 'luxon';
|
|
2
|
-
import { ModelBase } from '@spinajs/orm';
|
|
3
|
-
/**
|
|
4
|
-
* Base modele for users used by ACL
|
|
5
|
-
*
|
|
6
|
-
* To add / extend fields simply extend this model and register as default user model in ACL service
|
|
7
|
-
*/
|
|
8
|
-
export declare class JobModel<T> extends ModelBase {
|
|
9
|
-
Id: number;
|
|
10
|
-
JobId: string;
|
|
11
|
-
Name: string;
|
|
12
|
-
Result: T;
|
|
13
|
-
Status: 'error' | 'success' | 'created' | 'executing';
|
|
14
|
-
Progress: number;
|
|
15
|
-
Connection: string;
|
|
16
|
-
CreatedAt: DateTime;
|
|
17
|
-
ExecutedAt: DateTime;
|
|
18
|
-
FinishedAt: DateTime;
|
|
19
|
-
}
|
|
1
|
+
import { DateTime } from 'luxon';
|
|
2
|
+
import { ModelBase } from '@spinajs/orm';
|
|
3
|
+
/**
|
|
4
|
+
* Base modele for users used by ACL
|
|
5
|
+
*
|
|
6
|
+
* To add / extend fields simply extend this model and register as default user model in ACL service
|
|
7
|
+
*/
|
|
8
|
+
export declare class JobModel<T> extends ModelBase {
|
|
9
|
+
Id: number;
|
|
10
|
+
JobId: string;
|
|
11
|
+
Name: string;
|
|
12
|
+
Result: T;
|
|
13
|
+
Status: 'error' | 'success' | 'created' | 'executing';
|
|
14
|
+
Progress: number;
|
|
15
|
+
Connection: string;
|
|
16
|
+
CreatedAt: DateTime;
|
|
17
|
+
ExecutedAt: DateTime;
|
|
18
|
+
FinishedAt: DateTime;
|
|
19
|
+
}
|
|
20
20
|
//# sourceMappingURL=JobModel.d.ts.map
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { DateTime } from 'luxon';
|
|
11
|
-
import { ModelBase, Connection, Model, Json, CreatedAt, DateTime as DT, Primary } from '@spinajs/orm';
|
|
12
|
-
/**
|
|
13
|
-
* Base modele for users used by ACL
|
|
14
|
-
*
|
|
15
|
-
* To add / extend fields simply extend this model and register as default user model in ACL service
|
|
16
|
-
*/
|
|
17
|
-
let JobModel = class JobModel extends ModelBase {
|
|
18
|
-
};
|
|
19
|
-
__decorate([
|
|
20
|
-
Primary(),
|
|
21
|
-
__metadata("design:type", Number)
|
|
22
|
-
], JobModel.prototype, "Id", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
Json(),
|
|
25
|
-
__metadata("design:type", Object)
|
|
26
|
-
], JobModel.prototype, "Result", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
CreatedAt(),
|
|
29
|
-
__metadata("design:type", DateTime)
|
|
30
|
-
], JobModel.prototype, "CreatedAt", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
DT(),
|
|
33
|
-
__metadata("design:type", DateTime)
|
|
34
|
-
], JobModel.prototype, "ExecutedAt", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
DT(),
|
|
37
|
-
__metadata("design:type", DateTime)
|
|
38
|
-
], JobModel.prototype, "FinishedAt", void 0);
|
|
39
|
-
JobModel = __decorate([
|
|
40
|
-
Connection('queue'),
|
|
41
|
-
Model('queue_jobs')
|
|
42
|
-
], JobModel);
|
|
43
|
-
export { JobModel };
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DateTime } from 'luxon';
|
|
11
|
+
import { ModelBase, Connection, Model, Json, CreatedAt, DateTime as DT, Primary } from '@spinajs/orm';
|
|
12
|
+
/**
|
|
13
|
+
* Base modele for users used by ACL
|
|
14
|
+
*
|
|
15
|
+
* To add / extend fields simply extend this model and register as default user model in ACL service
|
|
16
|
+
*/
|
|
17
|
+
let JobModel = class JobModel extends ModelBase {
|
|
18
|
+
};
|
|
19
|
+
__decorate([
|
|
20
|
+
Primary(),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], JobModel.prototype, "Id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
Json(),
|
|
25
|
+
__metadata("design:type", Object)
|
|
26
|
+
], JobModel.prototype, "Result", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
CreatedAt(),
|
|
29
|
+
__metadata("design:type", DateTime)
|
|
30
|
+
], JobModel.prototype, "CreatedAt", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
DT(),
|
|
33
|
+
__metadata("design:type", DateTime)
|
|
34
|
+
], JobModel.prototype, "ExecutedAt", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
DT(),
|
|
37
|
+
__metadata("design:type", DateTime)
|
|
38
|
+
], JobModel.prototype, "FinishedAt", void 0);
|
|
39
|
+
JobModel = __decorate([
|
|
40
|
+
Connection('queue'),
|
|
41
|
+
Model('queue_jobs')
|
|
42
|
+
], JobModel);
|
|
43
|
+
export { JobModel };
|
|
44
44
|
//# sourceMappingURL=JobModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JobModel.js","sourceRoot":"","sources":["../../../src/models/JobModel.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEtG;;;;GAIG;AAGI,IAAM,QAAQ,GAAd,MAAM,QAAY,SAAQ,SAAS;CAyBzC,CAAA;
|
|
1
|
+
{"version":3,"file":"JobModel.js","sourceRoot":"","sources":["../../../src/models/JobModel.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEtG;;;;GAIG;AAGI,IAAM,QAAQ,GAAd,MAAM,QAAY,SAAQ,SAAS;CAyBzC,CAAA;AAvBQ;IADN,OAAO,EAAE;;oCACQ;AAOX;IADN,IAAI,EAAE;;wCACU;AASV;IADN,SAAS,EAAE;8BACM,QAAQ;2CAAC;AAGpB;IADN,EAAE,EAAE;8BACc,QAAQ;4CAAC;AAGrB;IADN,EAAE,EAAE;8BACc,QAAQ;4CAAC;AAxBjB,QAAQ;IAFpB,UAAU,CAAC,OAAO,CAAC;IACnB,KAAK,CAAC,YAAY,CAAC;GACP,QAAQ,CAyBpB"}
|