@bull-monitor/root
Advanced tools
Comparing version 3.4.1 to 3.5.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [3.5.0](https://github.com/s-r-x/bull-monitor/compare/v3.4.1...v3.5.0) (2022-03-02) | ||
### Features | ||
* **bullmq:** support object progress ([4d47b08](https://github.com/s-r-x/bull-monitor/commit/4d47b08cd0dc03a0e8546e0e2985369aa4f44de3)) | ||
## [3.4.1](https://github.com/s-r-x/bull-monitor/compare/v3.4.0...v3.4.1) (2022-03-01) | ||
@@ -8,0 +19,0 @@ |
@@ -15,3 +15,3 @@ /// <reference types="ioredis" /> | ||
get returnvalue(): unknown; | ||
get progress(): number; | ||
get progress(): string; | ||
get attemptsMade(): number; | ||
@@ -18,0 +18,0 @@ get failedReason(): Maybe<string>; |
@@ -27,3 +27,3 @@ "use strict"; | ||
get progress() { | ||
return this._job.progress(); | ||
return String(this._job.progress()) || '0'; | ||
} | ||
@@ -30,0 +30,0 @@ get attemptsMade() { |
@@ -14,3 +14,3 @@ import { Queue as BullMQQueue, Job as BullMQJob } from 'bullmq'; | ||
get returnvalue(): unknown; | ||
get progress(): number; | ||
get progress(): string; | ||
get attemptsMade(): number; | ||
@@ -17,0 +17,0 @@ get failedReason(): string | undefined; |
@@ -6,2 +6,3 @@ "use strict"; | ||
const queue_1 = require("./queue"); | ||
const json_1 = require("./services/json"); | ||
class BullMQJobAdapter extends queue_1.Job { | ||
@@ -30,7 +31,3 @@ constructor(_job, _queue) { | ||
get progress() { | ||
const progress = this._job.progress; | ||
if (typeof progress === 'number') { | ||
return progress; | ||
} | ||
return 0; | ||
return json_1.JsonService.maybeStringify(this._job.progress || '0', 0); | ||
} | ||
@@ -58,2 +55,3 @@ get attemptsMade() { | ||
} | ||
// public methods | ||
async getState() { | ||
@@ -60,0 +58,0 @@ const status = await this._job.getState(); |
@@ -33,3 +33,3 @@ "use strict"; | ||
returnValue: String | ||
progress: Int! | ||
progress: String! | ||
attemptsMade: Int! | ||
@@ -36,0 +36,0 @@ failedReason: String |
@@ -24,3 +24,3 @@ import type { Redis, Cluster } from 'ioredis'; | ||
abstract get returnvalue(): unknown; | ||
abstract get progress(): number; | ||
abstract get progress(): string; | ||
abstract get attemptsMade(): number; | ||
@@ -27,0 +27,0 @@ abstract get failedReason(): Maybe<string>; |
@@ -41,3 +41,3 @@ export declare type Maybe<T> = T | null; | ||
returnValue?: Maybe<Scalars['String']>; | ||
progress: Scalars['Int']; | ||
progress: Scalars['String']; | ||
attemptsMade: Scalars['Int']; | ||
@@ -44,0 +44,0 @@ failedReason?: Maybe<Scalars['String']>; |
{ | ||
"name": "@bull-monitor/root", | ||
"version": "3.4.1", | ||
"version": "3.5.0", | ||
"repository": { | ||
@@ -46,3 +46,3 @@ "type": "git", | ||
}, | ||
"gitHead": "645175f1e49d1e0a90acc0ea806b0e4eefbaf1a7" | ||
"gitHead": "dab5874ef152ab38b0e6adb4a548c5987c0b7d08" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
153496
2519