-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Job progress bar doesn't work with Bull v3 #45
Comments
Progress is actually broken in bee-queue (due to bee queue not supporting it). So feel free to submit a PR to fix it for Bull and hide it for Bee
… On Aug 29, 2017, at 8:19 PM, Ian Martin ***@***.***> wrote:
It appears that Bull v3 (precisely, 3.0.0-rc.4) returns a job's JSON object with _progress holding the progress field, instead of just progress. Thus, the progress bar in arena always effectively shows 0 percent.
logging the JSON object returned from the Queue class gives:
{ opts: { attempts: 1, delay: 0, timestamp: 1504061405201 },
name: '__default__',
queue:
Queue {
name: 'disc ripping',
token: '39700d85-c68a-427c-876a-e5aea5fb3d17',
keyPrefix: 'bull',
_initializing:
Promise {
_bitField: 33554432,
_fulfillmentHandler0: undefined,
_rejectionHandler0: undefined,
_promise0: undefined,
_receiver0: undefined },
handlers: {},
processing: [],
retrieving: 0,
settings:
{ lockDuration: 30000,
stalledInterval: 30000,
maxStalledCount: 1,
guardInterval: 5000,
retryProcessDelay: 5000,
drainDelay: 2000,
lockRenewTime: 15000 },
_events: { error: [Function] },
_eventsCount: 1,
timers: TimerManager { idle: true, listeners: [], timers: {} },
moveUnlockedJobsToWait: [Function: bound ],
processJob: [Function: bound ],
getJobFromId: [Function: bound ],
IS_BEE: false },
data: { something: 'somethingelse' },
_progress: 100,
delay: 0,
timestamp: 1504061405201,
stacktrace: [],
returnvalue: 18,
attemptsMade: 0,
id: '20',
finishedOn: 1504061415220,
processedOn: 1504061405209,
failedReason: undefined,
jobState: 'completed',
queueHost: 'ncodr',
queueName: 'disc ripping',
basePath: '' } { name: 'log',
hash: {},
data:
{ exphbs:
{ cache: false,
view: 'dashboard/templates/jobDetails',
layout: '/ncodr/node_modules/bull-arena/src/server/views/layout',
data: undefined,
helpers: {},
partials: [Object],
filePath: '/ncodr/node_modules/bull-arena/src/server/views/dashboard/templates/jobDetails.hbs' },
_parent: { exphbs: [Object] },
root:
{ settings: [Object],
Queues: [Object],
basePath: '',
queueName: 'disc ripping',
queueHost: 'ncodr',
jobState: 'completed',
job: [Object],
_locals: {},
cache: false } } }
Which ends up with a display looking like:
instead of a full across progress bar. In my troubleshooting, just changing to this._progress in src/server/views/partials/dashboard/jobDetails.hbs solves it. However, I would guess that Bee uses progress, and so the difference would need to be accounted for in arena somehow.
Maybe it's possible to alias _progress to progress if bull is being used from within jobDetails.js?
However, interestingly, when adding the following line in jobDetails.js (around line 28), I get correct output in the log:
console.log('jobdetails -- progress: ' + job.progress());
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It appears that Bull v3 (precisely, 3.0.0-rc.4) returns a job's JSON object with
_progress
holding the progress field, instead of justprogress
. Thus, the progress bar in arena always effectively shows 0 percent.logging the JSON object returned from the Queue class gives:
Which ends up with a display looking like:

instead of a full across progress bar. In my troubleshooting, just changing to
this._progress
insrc/server/views/partials/dashboard/jobDetails.hbs
solves it. However, I would guess that Bee usesprogress
, and so the difference would need to be accounted for in arena somehow.Maybe it's possible to alias
_progress
toprogress
if bull is being used from withinjobDetails.js
?However, interestingly, when adding the following line in
jobDetails.js
(around line 28), I get correct output in the log:console.log('jobdetails -- progress: ' + job.progress());
The text was updated successfully, but these errors were encountered: