Skip to content

Commit

Permalink
fix: use DEFAULT_JOB_NAME (#1585)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaulz committed Mar 21, 2020
1 parent 3a6a519 commit 031b231
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/job.js
Expand Up @@ -8,6 +8,7 @@ const errors = require('./errors');
const backoffs = require('./backoffs');

const FINISHED_WATCHDOG = 5000;
const DEFAULT_JOB_NAME = '__default__';

/**
interface JobOptions
Expand All @@ -23,7 +24,7 @@ const Job = function(queue, name, data, opts) {
if (typeof name !== 'string') {
opts = data;
data = name;
name = '__default__';
name = DEFAULT_JOB_NAME;
}

// defaults
Expand Down Expand Up @@ -56,7 +57,7 @@ function setDefaultOpts(opts) {
return _opts;
}

Job.DEFAULT_JOB_NAME = '__default__';
Job.DEFAULT_JOB_NAME = DEFAULT_JOB_NAME;

function addJob(queue, client, job) {
const opts = job.opts;
Expand Down

0 comments on commit 031b231

Please sign in to comment.