pass headers on job creation

This commit is contained in:
2016-07-21 14:31:32 -07:00
parent b916d1352a
commit 2c5519c253

View File

@@ -48,6 +48,10 @@ export default class Job extends events.EventEmitter {
} }
}; };
if (options.headers) {
indexParams.headers = options.headers;
}
this.ready = createIndex(this.client, this.index, this.doctype, this.indexSettings) this.ready = createIndex(this.client, this.index, this.doctype, this.indexSettings)
.then(() => this.client.index(indexParams)) .then(() => this.client.index(indexParams))
.then((doc) => { .then((doc) => {