Commit Graph

277 Commits

Author SHA1 Message Date
Simon Martín
617b83463d jshint happy 2018-02-12 11:15:00 +01:00
Simon Martín
c351360085 ensuring job_id on jobBackend.create and updating test 2018-02-12 10:39:58 +01:00
Raul Ochoa
3e536b822e Remove unnecessary destroyOnError option 2017-08-08 18:21:10 +02:00
Daniel García Aubert
7d24ce671b Update queue index while enqueueing jobs to the top of queue 2017-04-05 11:43:29 +02:00
Daniel García Aubert
c1dff1e395 Improve naming 2017-04-04 10:34:07 +02:00
Daniel García Aubert
36d5dc1719 Queue seeker refactor:
- Extract from job subcriber everything related to queue dicovering
 - Job Queue is responsible of queue dicovering and exposes functions to scan user queues.
 - Batch creates an interval to consume queues
 - Now Batch.start() does:
  * Finds existing queues from metadata, adding to queue index the ones that are not indexed yet
  * Binds callback to process jobs for every queue found.
  * Inits queue consumer interval
  * Subscribes to PUB/SUB channel
2017-04-03 19:26:21 +02:00
Daniel García Aubert
24ff1cf808 Discover and add to index queues of users with jobs on batch service startup 2017-04-03 12:34:30 +02:00
Daniel García Aubert
8f35e1d1af Fix typo 2017-04-03 11:38:20 +02:00
Daniel García Aubert
dd7cb73337 Remove unused dependency 2017-03-31 14:34:24 +02:00
Daniel García Aubert
8012fe26aa Avoid scan behaviour to discover active queues of user's jobs, now keeps an index to know which queues are available 2017-03-31 14:30:33 +02:00
Daniel García Aubert
6592435e87 Use COUNT option for scan command 2017-03-29 20:40:40 +02:00
Daniel García Aubert
09d5a14ade Check data from redis scan is an array 2017-03-29 20:04:19 +02:00
Daniel García Aubert
56429ffebf Use traditional for loop instead of .forEach() 2017-03-29 19:54:08 +02:00
Daniel García Aubert
2edfd1fad5 Compare interger instead of strings 2017-03-29 19:51:19 +02:00
Daniel García Aubert
34b352a0a6 Use max number of attempts to scan user queues 2017-03-29 19:38:36 +02:00
Raul Ochoa
9ae62014bd Include query status in log entries 2016-11-30 16:07:14 +01:00
Daniel García Aubert
4a2b7258be Do not return error if job could not added to work-in-progress list 2016-11-07 12:04:47 +01:00
Daniel García Aubert
78f5706726 Avoid to use scan command to search work in progress queues 2016-11-03 14:22:43 +01:00
Daniel García Aubert
cfeabf94c7 Fix jshint typo 2016-11-02 11:33:26 +01:00
Daniel García Aubert
92b01f1163 Hide add/clear job from work in progress list 2016-10-28 17:45:13 +02:00
Daniel García Aubert
e007b1c22a Fix jshint typo 2016-10-28 17:09:31 +02:00
Daniel García Aubert
aa1527b371 Use clear work-in-progress after finishing jobs 2016-10-28 15:58:41 +02:00
Daniel García Aubert
eaa3315982 Add clear work in progress job to service 2016-10-28 15:19:49 +02:00
Daniel García Aubert
ea06581ddb Add clear work in progress job 2016-10-28 15:18:57 +02:00
Daniel García Aubert
64d0dc93bf Removed unnecessary debug 2016-10-28 15:06:07 +02:00
Daniel García Aubert
af75bbda50 Rename 2016-10-28 12:50:33 +02:00
Daniel García Aubert
c35b21407a Call list of work in progress job 2016-10-28 12:49:59 +02:00
Daniel García Aubert
f0de347b56 Rename 2016-10-28 12:30:33 +02:00
Daniel García Aubert
7b48e43d92 Rename 2016-10-28 12:29:28 +02:00
Daniel García Aubert
224a4c933a Rename 2016-10-28 12:26:24 +02:00
Daniel García Aubert
1f657a4f94 Ensure test is isolated 2016-10-28 12:24:23 +02:00
Daniel García Aubert
97836e62b9 Add debug message 2016-10-27 20:45:47 +02:00
Daniel García Aubert
72419072ea Improve var definitions 2016-10-27 20:43:42 +02:00
Daniel García Aubert
0085b8ee3d List users with work in progress jobs 2016-10-27 20:42:49 +02:00
Daniel García Aubert
f65208ba0d Add listWorkInProgressJobByUser function 2016-10-27 18:43:28 +02:00
Daniel García Aubert
5b8108d4a8 Use job service to add jobs to work-in-progress list 2016-10-27 18:00:56 +02:00
Daniel García Aubert
c1f2f9377d Change signature 2016-10-27 17:46:43 +02:00
Daniel García Aubert
ed5b2fb132 Implement proxy function to save work-in-progress jobs 2016-10-27 17:40:13 +02:00
Daniel García Aubert
869139260b Implement function to save work-in-progress jobs 2016-10-27 17:36:40 +02:00
Daniel García Aubert
f6dffb81cb Use default name 2016-10-27 16:55:41 +02:00
Raul Ochoa
594aba6179 Stop migrating old queues by default 2016-10-21 16:07:27 +02:00
Raul Ochoa
16e9e709b8 Cancel with user statement_timeout limit from redis 2016-10-21 14:35:24 +02:00
Raul Ochoa
26e4cb3196 Get timeout from async function 2016-10-21 13:09:17 +02:00
Raul Ochoa
7563868514 Re-insert into the tree if there was a user in done state that gets a new task 2016-10-21 11:42:27 +02:00
Raul Ochoa
66a1c33f96 Simplify listener subscription logic
Always remove pending listeners on acquire call.
Always register add and release listeners on acquire.
2016-10-20 23:47:39 +02:00
Raul Ochoa
58deb49972 Remove runAt property as it is not used 2016-10-20 23:45:30 +02:00
Raul Ochoa
e4d54e9ab7 Fix condition to pick next candidate 2016-10-20 20:16:57 +02:00
Raul Ochoa
aa69bcf34c Increase to 4 the default value for fixed capacity 2016-10-20 20:16:34 +02:00
Raul Ochoa
4e3bff9a70 Simplify scheduler to only consider task creation and number of queries 2016-10-20 12:21:41 +02:00
Raul Ochoa
5185c1e225 Cache valid responses for 500 ms 2016-10-20 12:06:51 +02:00