8000 Merge pull request #277 from kbsanders/patch-2 · JavaScriptExpert/kue@68802a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 68802a5

Browse files
committed
Merge pull request Automattic#277 from kbsanders/patch-2
Job.toJSON() line wrapping for readability
2 parents 850a756 + e73c4f3 commit 68802a5

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

lib/queue/job.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,22 @@ Job.prototype.__proto__ = EventEmitter.prototype;
238238

239239
Job.prototype.toJSON = function () {
240240
return {
241-
id: this.id, type: this.type, data: this.data, priority: this._priority, progress: this._progress || 0, state: this._state, error: this._error, created_at: this.created_at, updated_at: this.updated_at, failed_at: this.failed_at, duration: this.duration, delay: this._delay, attempts: {
242-
made: this._attempts, remaining: this._max_attempts - this._attempts, max: this._max_attempts
241+
id: this.id
242+
, type: this.type
243+
, data: this.data
244+
, priority: this._priority
245+
, progress: this._progress || 0
246+
, state: this._state
247+
, error: this._error
248+
, created_at: this.created_at
249+
, updated_at: this.updated_at
250+
, failed_at: this.failed_at
251+
, duration: this.duration
252+
, delay: this._delay
253+
, attempts: {
254+
made: this._attempts
255+
, remaining: this._max_attempts - this._attempts
256+
, max: this._max_attempts
243257
}
244258
};
245259
};

0 commit comments

Comments
 (0)
0