Skip to content

Commit

Permalink
Made progress
Browse files Browse the repository at this point in the history
Everything is done, except that the Delay category only shows
the initial delay and doesn't currently update dynamically.
  • Loading branch information
Alex Ross authored and Alex Ross committed Oct 3, 2019
1 parent bf3b527 commit 03a4fc6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
Binary file removed dump.rdb
Binary file not shown.
1 change: 0 additions & 1 deletion example.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const run = () => {
for (let i = 0; i <= 100; i++) {
await sleep(Math.random())
job.progress(i)
console.log(job.delay)
if (Math.random() * 200 < 1) throw new Error(`Random error ${i}`)
}
})
Expand Down
1 change: 1 addition & 0 deletions routes/getDataForQeues.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const formatJob = job => {
finishedOn: job.finishedOn,
progress: job._progress,
attempts: job.attemptsMade,
delay: job.delay,
failedReason: job.failedReason,
stacktrace: job.stacktrace,
opts: job.opts,
Expand Down
5 changes: 4 additions & 1 deletion ui/components/Queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const statuses = [
const fields = {
latest: ['id', 'timestamps', 'progress', 'attempts', 'data', 'opts'],
completed: ['id', 'timestamps', 'progress', 'attempts', 'data', 'opts'],
delayed: ['id', 'timestamps', 'attempts', 'data', 'opts'],
delayed: ['id', 'timestamps', 'attempts', 'delay', 'data', 'opts'],
paused: ['id', 'timestamps', 'attempts', 'data', 'opts'],
active: ['id', 'timestamps', 'progress', 'attempts', 'data', 'opts'],
waiting: ['id', 'timestamps', 'data', 'opts'],
Expand Down Expand Up @@ -190,6 +190,9 @@ const fieldComponents = {
attempts: ({ job }) => {
return job.attempts
},
delay: ({ job }) => {
return job.delay
},
failedReason: ({ job }) => {
return (
<>
Expand Down

0 comments on commit 03a4fc6

Please sign in to comment.