don't track jobs internally
it'll likely make more sense to just look them up at request time
This commit is contained in:
@@ -8,9 +8,6 @@ export default class Elastique extends events.EventEmitter {
|
|||||||
if (!index) throw new Error('Must specify an index to write to');
|
if (!index) throw new Error('Must specify an index to write to');
|
||||||
|
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.ready = true;
|
|
||||||
this.jobs = [];
|
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.settings = Object.assign({
|
this.settings = Object.assign({
|
||||||
interval: '1w',
|
interval: '1w',
|
||||||
@@ -25,7 +22,6 @@ export default class Elastique extends events.EventEmitter {
|
|||||||
}, opts);
|
}, opts);
|
||||||
|
|
||||||
var job = new Job(this, type, payload, options);
|
var job = new Job(this, type, payload, options);
|
||||||
this.jobs.push(job.id);
|
|
||||||
return job;
|
return job;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user