Commit Graph

41 Commits

Author SHA1 Message Date
Daniel García Aubert
20fd536659 Now batch stop is synchronous, changed signature in test.
Fixed minor issue when draining the last job, queue is got before cancel the job.
2016-01-25 14:51:37 +01:00
Daniel García Aubert
e6f714a51b Implemented some new unit test 2016-01-22 19:31:25 +01:00
Daniel García Aubert
cb638bb0fe Fixed issue with Postgres error codes, implemented some test for job controller 2016-01-22 18:22:21 +01:00
Daniel García Aubert
5c4d239467 Fixed unit test for job queue and moved isJobFound function as private method in job backend 2016-01-22 12:43:41 +01:00
Daniel García Aubert
31ac48ef1a Changed job's ttl to be configurable 2016-01-21 15:33:42 +01:00
Daniel García Aubert
d07af1740a Fixed bug after cancel a job by user the job runner's callback is never called 2016-01-17 19:28:15 +01:00
Daniel García Aubert
a89e3776ec Removed unused callback in before hook in test and added proper configuration from user database config 2016-01-14 14:08:34 +01: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
8d29e6b45c Improved log messages 2016-01-08 16:24:53 +01:00
Daniel García Aubert
20f00d58d9 Refactored batch service to avoid event noise, doing in callback way 2016-01-08 15:47:59 +01:00
Daniel García Aubert
f9f52d2bd1 Improved object creation in batch service 2016-01-08 11:32:01 +01:00
Daniel García Aubert
44d4fd1bb8 Minor improvement in job runner creation 2016-01-07 19:16:39 +01:00
Daniel García Aubert
f89c44586c Fixed bug related to growing file descriptors when batch api processes jobs 2016-01-07 18:36:32 +01:00
Daniel García Aubert
e6a4e0f7eb Returned 201 HTTP code in job creation
Fixed bug listing jobs, now user job index is cleaned before respond to client
2016-01-07 12:07:30 +01:00
Daniel García Aubert
681772bf37 Implemented test for Job Controller and implemented batch stop service 2016-01-05 17:42:28 +01:00
Daniel García Aubert
246655de94 Changed redis data structure for users jobs 2016-01-04 19:08:13 +01:00
Daniel García Aubert
13ffaab0d5 Resolved minor bug when user tries to cancel a job and included a ttl to jobs after its resolution 2016-01-04 15:20:06 +01:00
Daniel García Aubert
534da04270 Improved job cancelation and fixed minor bugs 2015-12-31 17:01:06 +01:00
Daniel García Aubert
35650985db Implemented job modification whether job is pending 2015-12-31 15:42:31 +01:00
Daniel García Aubert
ef354bdb4d Improved queue consuption avoiding possible stack overflow 2015-12-31 12:33:11 +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
41a01bc0e3 Fixed typo in batch service 2015-12-30 11:51:32 +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
Daniel García Aubert
c4f96b4a59 Implemented support for listing jobs for one user 2015-12-24 17:42:49 +01:00
Daniel García Aubert
15d76f7cc7 Added postgres default port 2015-12-23 18:59:43 +01:00
Daniel García Aubert
ecb76ca1de Improved batch API being consistent with naming, humam readability for job dates, hide redis key details for jobs. 2015-12-23 17:29:11 +01:00
Daniel García Aubert
b16c0983c6 Implemented tests for batch API 2015-12-22 23:13:33 +01:00
Daniel García Aubert
3c23bf12e7 Fixed bug whether a job consumer is empty. And refactored batch module, now is a common object intead of module function 2015-12-22 20:12:10 +01:00
Daniel García Aubert
f41c43aa38 Disabled statement timeout bypassing pgbouncer connection 2015-12-22 15:43:00 +01:00
Daniel García Aubert
3762ad7a39 Now jobs are stored in redis instead of user's database 2015-12-21 19:57:10 +01:00
Daniel García Aubert
fb8feeb964 Now Job is an event emitter instance and we are able to know what happen wwith any job. Implemented test without a silly timeout 2015-12-16 18:13:48 +01:00
Daniel García Aubert
43f759e96a Refactored Batch API using streams instead a interval to consume the job queue. Limited one job running at the same time per queue instead of using a job's counter to limit it. 2015-12-16 15:57:58 +01:00
Daniel García Aubert
d0787d03f7 Reused matadata backend instance for batch service 2015-12-14 10:36:16 +01:00
Daniel García Aubert
fe9280b0f7 Fixed bug in job manager when reenqueue a job when there is no slot to run it 2015-12-11 18:08:19 +01:00
Daniel García Aubert
1002375439 Fixed issue when retrieving user metadata was not parsed properly 2015-12-10 18:09:43 +01:00
Daniel García Aubert
f5ca879ce3 Added entry point for main app to batch api 2015-12-10 15:08:31 +01:00
Daniel García Aubert
a941d99b2f Now long running queries with statement SELECT are piped to a new table 2015-12-09 22:05:04 +01:00
Daniel García Aubert
6cc48bf9dd Implemented batch service 2015-12-09 20:17:45 +01:00
Daniel García Aubert
0c6edc573a Used cartodb-redis instead redis-mpool 2015-12-09 12:18:33 +01:00
Daniel García Aubert
00721bcd02 Implementing batch service 2015-12-09 00:02:08 +01:00