update toJSON, add tests, remove unused var

This commit is contained in:
2016-04-25 15:16:00 -07:00
parent 4d5b08c3c7
commit 58a0cf328f
2 changed files with 35 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
import events from 'events';
import { isPlainObject } from 'lodash';
import { omit, values } from 'lodash';
import { omit } from 'lodash';
import logger from './helpers/logger';
import { jobStatuses } from './helpers/constants';
import createIndex from './helpers/create_index';
@@ -80,7 +80,7 @@ export default class Job extends events.EventEmitter {
type: this.type,
payload: this.payload,
timeout: this.timeout,
maxAttempts: this.maxAttempts,
max_attempts: this.maxAttempts,
priority: this.priority,
}, omit(this.document, ['version']));
}