Daniel García Aubert
af75bbda50
Rename
2016-10-28 12:50:33 +02:00
Daniel García Aubert
1f657a4f94
Ensure test is isolated
2016-10-28 12:24:23 +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
8f65e6b16c
Add test
2016-10-27 18:24:39 +02:00
Raul Ochoa
16e9e709b8
Cancel with user statement_timeout limit from redis
2016-10-21 14:35:24 +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
62cfe974b7
Use constants for users
2016-10-21 11:10:17 +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
e4d54e9ab7
Fix condition to pick next candidate
2016-10-20 20:16:57 +02:00
Raul Ochoa
80d2e190ad
Fix test, use fixed to replace one and infinity
2016-10-19 18:47:55 +02:00
Raul Ochoa
604e28533c
Fix and improve test
2016-10-19 16:58:57 +02:00
Raul Ochoa
372c9f5511
Basic test to test scheduler happy case
2016-10-19 16:57:10 +02:00
Raul Ochoa
5030fddc9c
Allow to override test client
2016-10-19 16:56:43 +02:00
Raul Ochoa
1ee0878631
Scheduler uses a red–black tree to decide on next job candidate
2016-10-19 16:55:49 +02:00
Raul Ochoa
2853c7b0a7
Fix status check
2016-10-19 10:36:27 +02:00
Raul Ochoa
1e490be0a1
Don't rely on batch.on(job:status)
2016-10-18 20:18:49 +02:00
Raul Ochoa
a29f847767
Don't rely on batch.on(job:status)
2016-10-18 20:05:57 +02:00
Raul Ochoa
a1400e956d
Don't rely on batch.on(job:status)
2016-10-18 20:01:11 +02:00
Raul Ochoa
66d1c18941
Default to 64 queued jobs as max
2016-10-17 15:23:53 +02:00
Raul Ochoa
cdde1be29e
Re-use redis pool as much as possible
2016-10-17 15:02:34 +02:00
Raul Ochoa
4dad54d004
Add test to validate query order by user
2016-10-17 12:33:49 +02:00
Raul Ochoa
b8a57460dc
Handle stop gracefully
2016-10-17 12:28:01 +02:00
Raul Ochoa
8b9a30eb75
Queue seeker was not _finding_ queues when only one present
2016-10-17 12:27:06 +02:00
Raul Ochoa
f6dc991ab5
Allow to override configuration per API call
2016-10-17 10:52:35 +02:00
Raul Ochoa
cb23b7f46c
Make test finish quicker
2016-10-17 10:52:07 +02:00
Raul Ochoa
5bb7d8fa1c
Merge branch 'master' into batch-user-queues
2016-10-14 12:33:37 +02:00
Raul Ochoa
b510a3684d
Add option to skip script downloading
2016-10-14 12:28:43 +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
aa68dff24b
Use constants for tests
2016-10-12 18:44:46 +02:00
Raul Ochoa
b86f82d3ca
Batch.stop removes all listeners
2016-10-12 16:43:18 +02:00
Raul Ochoa
c21f373291
Tests for locker
2016-10-12 13:15:55 +02:00
Raul Ochoa
167ecc6965
Set NODE_ENV environment var to test
2016-10-12 01:41:01 +02:00
Raul Ochoa
611508c654
Hide queue seeker behind job subscriber
2016-10-11 19:01:39 +02:00
Raul Ochoa
e4b1711e8e
pub/sub package
2016-10-11 18:28:46 +02:00
Raul Ochoa
f036e29b8f
Make test stable
2016-10-10 19:47:18 +02:00
Raul Ochoa
41d7823227
Drop table if exists
2016-10-10 19:46:53 +02:00
Raul Ochoa
a0ace8d034
Use name in test
2016-10-10 19:46:39 +02:00
Raul Ochoa
66820a67bb
Make possible to specify a name for batch
2016-10-10 19:46:07 +02:00
Raul Ochoa
f4950f73c0
Add test to validate multiple consumers query order scenario
2016-10-10 15:56:04 +02:00
Raul Ochoa
ece95afc95
Add test client to run plain queries
2016-10-10 15:37:46 +02:00
Raul Ochoa
46579093dd
Fix test scenario description
2016-10-10 15:37:19 +02:00
Raul Ochoa
8ac656492f
Move to support directory
2016-10-10 15:22:50 +02:00
Raul Ochoa
faa02a79b9
Test for 578c43b1a8
2016-10-10 15:17:05 +02:00
Raul Ochoa
8a4f54bb87
Allow users to set max statement_timeout for their queries
2016-10-10 12:01:36 +02:00
Raul Ochoa
2ac39b5748
Move all batch tests to their own directory
2016-10-06 11:53:56 +02:00
Raul Ochoa
b07e2d3de5
Merge pull request #346 from CartoDB/fix-batch-api-test
...
Removed duplicated config
2016-10-04 13:01:46 +02:00
Raul Ochoa
0e03bcd1d3
Delete table so suite ends clear
2016-09-26 18:28:15 +02:00
Raul Ochoa
2712d81d50
Remove unused server utils
2016-09-26 18:13:08 +02:00