qdone 2.0.32-alpha → 2.0.33-alpha
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.
|
@@ -40,10 +40,8 @@ class JobExecutor {
|
|
|
40
40
|
if (this.opt.verbose) {
|
|
41
41
|
console.error(chalk_1.default.blue('Shutting down jobExecutor'));
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
await this.maintainVisibility();
|
|
46
|
-
}
|
|
43
|
+
await this.maintainPromise;
|
|
44
|
+
await this.maintainVisibility();
|
|
47
45
|
}
|
|
48
46
|
activeJobCount() {
|
|
49
47
|
return this.stats.activeJobs;
|
|
@@ -122,19 +120,18 @@ class JobExecutor {
|
|
|
122
120
|
console.error(chalk_1.default.blue('Jobs: '));
|
|
123
121
|
for (const [qname, jobs] of this.jobsByQueue.entries()) {
|
|
124
122
|
if (jobs.size) {
|
|
125
|
-
|
|
126
|
-
for (const job of jobs)
|
|
127
|
-
if (job.status === 'running')
|
|
128
|
-
console.error(chalk_1.default.green(' running: '), job.payload);
|
|
123
|
+
const stats = {};
|
|
129
124
|
for (const job of jobs)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
125
|
+
stats[job.status] = (stats[job.status] || 0) + 1;
|
|
126
|
+
console.error(chalk_1.default.blue(' queue:'), qname);
|
|
127
|
+
if (stats.running)
|
|
128
|
+
console.error(chalk_1.default.green(' running: '), stats.running);
|
|
129
|
+
if (stats.waiting)
|
|
130
|
+
console.error(chalk_1.default.yellow(' waiting: '), stats.waiting);
|
|
131
|
+
if (stats.deleting)
|
|
132
|
+
console.error(chalk_1.default.blue(' complete: '), stats.deleting);
|
|
133
|
+
if (stats.failed)
|
|
134
|
+
console.error(chalk_1.default.red(' failed: '), stats.failed);
|
|
138
135
|
}
|
|
139
136
|
}
|
|
140
137
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qdone",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.33-alpha",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "qdone",
|
|
9
|
-
"version": "2.0.
|
|
9
|
+
"version": "2.0.33-alpha",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cloudwatch": "3.465.0",
|
package/package.json
CHANGED
|
@@ -41,10 +41,8 @@ export class JobExecutor {
|
|
|
41
41
|
if (this.opt.verbose) {
|
|
42
42
|
console.error(chalk.blue('Shutting down jobExecutor'))
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
await this.maintainVisibility()
|
|
47
|
-
}
|
|
44
|
+
await this.maintainPromise
|
|
45
|
+
await this.maintainVisibility()
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
activeJobCount () {
|
|
@@ -129,11 +127,13 @@ export class JobExecutor {
|
|
|
129
127
|
console.error(chalk.blue('Jobs: '))
|
|
130
128
|
for (const [qname, jobs] of this.jobsByQueue.entries()) {
|
|
131
129
|
if (jobs.size) {
|
|
130
|
+
const stats = {}
|
|
131
|
+
for (const job of jobs) stats[job.status] = (stats[job.status] || 0) + 1
|
|
132
132
|
console.error(chalk.blue(' queue:'), qname)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
if (stats.running) console.error(chalk.green(' running: '), stats.running)
|
|
134
|
+
if (stats.waiting) console.error(chalk.yellow(' waiting: '), stats.waiting)
|
|
135
|
+
if (stats.deleting) console.error(chalk.blue(' complete: '), stats.deleting)
|
|
136
|
+
if (stats.failed) console.error(chalk.red(' failed: '), stats.failed)
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
}
|