Commit Graph

14 Commits

Author SHA1 Message Date
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
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
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
Raul Ochoa
a8e03f01c9 Add debug information in Jobs Queue 2016-10-17 18:44:37 +02:00
Raul Ochoa
1e442b37ab Allow to set a max number of queued jobs per user 2016-10-12 22:40:35 +02:00
Raul Ochoa
1f038ac1f4 Moves from host queues to user queues
- Existing jobs are moved before start processing them.
 - Uses a new queue prefix to avoid collisions.
 - Pub/Sub also changes communication channel.
 - Job subscriber emits user+host on new jobs.
 - Batch processor is faulty. See TODO in batch.js.
2016-10-12 21:32:29 +02:00
Raul Ochoa
f7d1f9426c Use constants for queues 2016-10-12 17:53:03 +02:00
Daniel García Aubert
a1f31df92e Now Batch API broadcast to other APIs everytime that re-enqueues a multiple-query job 2016-06-29 18:29:53 +02:00
Daniel García Aubert
c308551d05 Implemented drain to stop batch service gracefully.
Split job acceptance test
2016-01-13 16:25:25 +01:00
Daniel García Aubert
ada39d84b8 Implemented job cancelation in Batch API 2015-12-30 20:16:18 +01:00
Daniel García Aubert
8c42019641 Improved namespace in redis for batch's stuff 2015-12-29 15:46:04 +01:00
Daniel García Aubert
851c393f75 Refactored batch manager avoiding concurrence issues 2015-12-29 10:19:10 +01:00