Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions example/bullmq.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ async function main() {

// adding delayed jobs
const delayedJob = await queue.add('delayed', {}, {delay: 60 * 1000});
await queue.add(
'delayed',
{},
{
delay: 1000,
attempts: 4,
backoff: {
type: 'exponential',
delay: 60000,
},
}
);
await queue.add('cron', {}, {repeat: {pattern: '* 1 * 1 *'}});
delayedJob.log('Log message');

Expand Down
6 changes: 5 additions & 1 deletion src/server/views/helpers/handlebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ const helpers = {
getDelayedExecutionAt(job) {
// Bull
if (job.delay) {
return job.delay + getTimestamp(job);
if (job.processedOn) {
return job.processedOn + job.delay;
} else {
return job.timestamp + job.delay;
}
}

// Bee
Expand Down
19 changes: 17 additions & 2 deletions src/server/views/partials/dashboard/jobDetails.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,16 @@

<div class="col-sm-3">
<h5>Timestamp</h5>
{{#if (getTimestamp this)}}
{{moment (getTimestamp this) "llll"}}
{{#if queue.IS_BEE}}
{{#if this.options}}
{{#if (isNumber this.options.timestamp)}}
{{moment this.options.timestamp "llll"}}
{{/if}}
{{/if}}
{{else}}
{{#if (isNumber this.timestamp)}}
{{moment this.timestamp "llll"}}
{{/if}}
{{/if}}
</div>

Expand Down Expand Up @@ -76,6 +84,13 @@
{{length this.options.stacktraces}}
{{/if}}
</div>

{{#if (isNumber this.attemptsStarted)}}
<div class="col-sm-3">
<h5>Attempts Started</h5>
{{this.attemptsStarted}}
</div>
{{/if}}
</div>
<div class="row">
<div class="col-sm-4">
Expand Down