Ilan Steemers
e62fd1ee70
Fixes #7
...
* added a synchronous cluster simulation
* added a test for the sync function
* moved signing into its own module
* refactored imports to solve circular import problems stemming from the task module pretending to be a cluster
* added documentation for the new sync option
2015-07-09 20:16:21 +02:00
Ilan Steemers
0413a2e65a
refresh_from_db is 1.8 only
2015-07-08 21:06:32 +02:00
Ilan Steemers
0a8196838a
Removed security middleware from test for Django 1.7
2015-07-08 21:02:00 +02:00
Ilan Steemers
f29fdee5ad
Fixes import error
2015-07-08 13:43:46 +02:00
Ilan Steemers
f8708cfd73
Task now uses a UUID4 instead of a LUID
2015-07-08 13:33:03 +02:00
Ilan Steemers
729abaf726
set exit timeout if no timeout is given
2015-07-07 20:37:03 +02:00
Ilan Steemers
4ee47fc38f
upping the coverage
2015-07-07 20:20:28 +02:00
Ilan Steemers
d06aa40a38
Removed Cluster.is_idle
...
It wasn't used and it could be confused with the cluster stat IDLE
2015-07-06 11:13:54 +02:00
Ilan Steemers
b113a52825
Restructured all the modules
...
The core module was becoming too large.
By splitting it in cluster, monitor and tasks it becomes more manageable. It also reflects the documentation structure.
2015-07-03 15:12:11 +02:00
Ilan Steemers
2c88b1aef6
superfluous import removed
2015-07-02 13:53:12 +02:00
Ilan Steemers
5399865f4e
Adds timeout and reincarnation test
...
Also found a bug because of this.
2015-07-02 12:10:18 +02:00
Ilan Steemers
d1930a3de1
Fixes Travis hang up
...
New admin test introduced a task in the queue which was picked up by the cluster on Travis. Switching cluster test to different list key should prevent this.
2015-07-01 12:52:47 +02:00
Ilan Steemers
ba525a9312
Fixes Travis error
...
added failing hook to tests
2015-07-01 12:42:13 +02:00
Ilan Steemers
b3702319c2
Added admin test for failure resubmission
2015-07-01 12:28:04 +02:00
Ilan Steemers
6853b17a7b
Improved admin test
2015-07-01 11:44:20 +02:00
Ilan Steemers
4e38925cea
Adds timeout mechanism for workers
...
Workers now share a ctype with the sentinel to indicate if they are currently executing a task. This timer is incremented each guard loop until the worker resets it after finishing a job or until it reaches the TIMEOUT value and the worker is terminated by the sentinel.
2015-07-01 10:54:36 +02:00
Ilan Steemers
4096b35adf
Added schedule command
...
* improved schedule tests
* updated README
* bumped up to version 0.1.3
2015-06-30 16:38:08 +02:00
Ilan Steemers
b0423a42d3
Fix import error on travis
2015-06-30 11:01:36 +02:00
Ilan Steemers
482569b312
Rework - configuration now in class - better stop handling under heavy load. - scheduler test - better monitoring - better status reporting
2015-06-30 10:58:24 +02:00
Ilan Steemers
d0b950f9d6
Configuration is now through a dict.
2015-06-28 14:26:55 +02:00
Ilan Steemers
7fd381319c
fixed relative import
2015-06-27 20:07:47 +02:00
Ilan Steemers
b0e738d31b
Passing the redis connection around the cluster to reduce connections
2015-06-27 20:03:32 +02:00
Ilan Steemers
d8020f0c0b
Redis server now configurable with Q_REDIS. Moved constants to conf
2015-06-27 12:08:33 +02:00
Ilan Steemers
8c4f0110fb
Added default logger handler and made coloredlogs optional
2015-06-26 18:07:44 +02:00
Ilan Steemers
f08773f37d
Improved cluster test
2015-06-26 17:20:09 +02:00
Ilan Steemers
666bdc97dc
* updated README
...
* both func and hook check for callable.
2015-06-26 14:24:25 +02:00
Ilan Steemers
d5d529f874
added schedule admin to admin test
2015-06-25 19:54:40 +02:00
Ilan Steemers
d06de5769b
added scheduled tasks with admin interface
2015-06-25 19:48:38 +02:00
Ilan Steemers
6314742343
simple test for monitor
2015-06-25 13:29:06 +02:00
Ilan Steemers
99a44dda45
simple test for monitor
2015-06-25 13:22:16 +02:00
Ilan Steemers
06791005c9
allow Null results - added test
2015-06-24 22:23:22 +02:00
Ilan Steemers
e0864f037d
py.test discourages __init__.py in tests, but pytest-django needs it,
2015-06-24 19:13:56 +02:00
Ilan Steemers
0798c42354
adding url module for test
2015-06-24 17:04:30 +02:00
Ilan Steemers
21a4950f36
fixed test settings error
2015-06-24 16:56:07 +02:00
Ilan Steemers
7878b4c05c
fixing django settings for travis
2015-06-24 16:08:05 +02:00
Ilan Steemers
67180c1984
Initial tests
2015-06-24 15:29:16 +02:00
Ilan Steemers
0ed1da8f05
Refactoring to make testing more stable
2015-06-23 21:12:08 +02:00
Ilan Steemers
9f4e4d94e4
Added basic cluster stats
...
TODO add these to django admin
2015-06-20 15:00:40 +02:00
Ilan Steemers
ed9883470d
Separated Cluster and Sentinel into two classes.
2015-06-19 22:24:27 +02:00
Ilan Steemers
45e5187126
Updated README
2015-06-18 18:59:31 +02:00
Ilan Steemers
5adf92eb27
hooks now work
...
refactored task as dict instead of list for readability.
2015-06-18 15:23:21 +02:00
Ilan Steemers
90b5b0d6ab
moved static methods to module functions
...
medic is now sentinel and runs in it's own process
sentinel shutdown procedure more stable
2015-06-18 14:10:48 +02:00
Ilan Steemers
85f971ae40
Added test task countdown
2015-06-17 23:49:14 +02:00
Ilan Steemers
c8d2927dd2
restructured app and added task signing
2015-06-17 13:33:46 +02:00
Ilan Steemers
093431e88d
Lots of stuff
...
- changed to single monitor for success and failures
- result is now in django model
- started addings tests
2015-06-16 19:03:00 +02:00