this.q.create(name, data) .priority(options.priority || 'normal') .removeOnComplete(options.removeOnComplete || false) .attempts(options.attempts) .ttl((options.ttl ? options.ttl + this.ttl_buffer : 10000 + this.ttl_buffer )) // 10s .backoff(options.backoff) .delay(options.delay) .save(function(err){ debug('Add job ' + job.type + '(' + job.id + ') ' + JSON.stringify(data)) fn && fn(err) })