Commit Graph

140 Commits

Author SHA1 Message Date
bb898e26c2 add 20x delay when search results in an error 2017-08-08 10:55:33 -07:00
6bdf7163b6 add new events
one for when the search is completed, and one for when the job poller is ready
2017-08-08 10:55:33 -07:00
128905cdb4 track poller running state
use setTimeout, and wait for the search and job processing to complete before polling for jobs again
2017-08-08 10:55:33 -07:00
01adab4174 move poller state into this._poller 2017-08-08 10:55:33 -07:00
32fb6a92f5 better fix for the worker doctype
use the queue's doctype if one is not provided. also adds the option to the readme
2017-05-23 18:11:16 -07:00
d4f24182b4 use the queue doctype in the worker by default
allow the user to override the setting
2017-05-23 18:11:16 -07:00
79affbce76 remove ignore 400 on index creation 2017-03-01 16:01:28 -07:00
0e0c3feab9 fix mapping types for 5.x+
elasticsearch has deprecated the string type in 5.x, and is removing it in 6.x
2017-03-01 11:23:23 -07:00
c6c73f6dd2 fix code and tests, use custom errors 2017-02-28 15:52:41 -07:00
9cff4e4b04 replace typed errors with custom errors 2017-02-28 15:52:40 -07:00
bbd82a1de1 replace lodash methods with local helpers 2017-02-28 14:48:23 -07:00
64c1c90337 add plain object check and omit helpers 2017-02-28 14:45:43 -07:00
Joe Fleming
3cc8573ab0 Merge pull request #13 from w33ble/fix/worker-destroy
Worker destroy() will stops job polling
2016-12-16 16:57:52 -07:00
c64c5c80d6 call _stopJobPolling on destroy 2016-12-16 16:50:48 -07:00
4befaee4cc minor syntax change
make running more clearly a private state variable
2016-12-16 16:45:23 -07:00
jason allen
7c1189cf3c [FIX] worker destroy will really stop it. 2016-12-15 09:27:27 -08:00
Jason Allen
3d34642de4 Fix typo in Worker Class name
It was mistakenly called Job.
2016-12-01 07:58:35 -08:00
2753986038 remove the timeout param from ping 2016-10-19 13:39:22 -07:00
64ff676fab change the queue error 2016-10-19 13:39:07 -07:00
Court Ewing
7af0c82080 Use excludes instead of exclude in ES _source query
As of ES 5.0, you must use the plural name.
2016-09-14 12:24:11 -04:00
83f267a028 add dateSeparator on index creation 2016-08-22 11:11:57 -07:00
faeb705dee add date separator constant, update tests 2016-08-22 11:11:38 -07:00
10003e147d allow valid datestamp separator to be specified 2016-08-22 10:49:01 -07:00
597052dc4e add test for passing headers on job creation 2016-07-21 14:39:07 -07:00
2c5519c253 pass headers on job creation 2016-07-21 14:31:32 -07:00
b916d1352a rename client creation module 2016-07-21 14:31:15 -07:00
2c025e02c9 refresh the index after adding job
makes the job searchable after the creation event emits
2016-07-19 12:49:27 -07:00
8e8609eede always emit job failure event 2016-07-12 11:15:05 -07:00
bfe8799b90 add job creation error
use it on creation error, update tests
2016-07-11 16:03:59 -07:00
c758fb55a6 rename the worker timeout error 2016-07-11 15:48:31 -07:00
8cd2fde3a8 add test for worker failure event 2016-07-11 15:48:08 -07:00
9a71fcc7b5 emit on any worker job failure 2016-07-11 15:48:08 -07:00
9cfc080b64 emit events on queue instance 2016-07-11 15:48:08 -07:00
40d67829c8 pass the entire queue to the Job instance 2016-07-11 15:48:08 -07:00
630733b093 apped job index to event 2016-07-11 15:48:07 -07:00
c6986e3677 move constants to lib root 2016-07-11 15:48:04 -07:00
27390fef44 put job info under job property on success emitter 2016-07-11 10:27:08 -07:00
d16d3ea4dd cause worker emitter to emit on the queue instance 2016-07-08 18:34:45 -07:00
057bd26b74 emit on worker completion
with test
2016-07-08 18:00:04 -07:00
362469f541 error emitters should return more than just the error
update tests, and properly catch error conditions in worker event tests
2016-07-08 18:00:04 -07:00
3934f0cd1b update emit calls with constants 2016-07-08 18:00:04 -07:00
919fec4835 add event types to constants 2016-07-08 18:00:04 -07:00
b99f5ff1b9 don't pass headers through to jobs 2016-07-08 18:00:02 -07:00
d2e843f05b collect indexSettings on queue creation, pass to job and use at index creation 2016-06-28 18:29:56 -07:00
13a78d12cc allow index settings to be passed on index creation 2016-06-28 18:28:53 -07:00
1d4c45c5d9 fix worker debug output 2016-06-28 18:28:12 -07:00
460d83411e properly handle job errors without a toString method 2016-06-28 17:49:45 -07:00
2b2db9c5f9 add UnspecifiedWorkerError error 2016-06-28 17:49:10 -07:00
df03738b9a rename the timeout error type 2016-06-28 17:46:06 -07:00
db1d282da2 handle resolve, reject and timeout correctly 2016-06-28 17:03:28 -07:00