Commit Graph

838 Commits

Author SHA1 Message Date
Nic Cope 6ab7070a92 Rename registry timeout to registry ttl
This matches job.cleanup() better and (I think) makes the purpose slightly clearer.
2014-12-01 18:21:48 -05:00
Nic Cope 9f699d758d Any negative number should cause a job to live forever in a registry.
While the documentation explicitly mentions ttl=-1, this matches better the behaviour of the job.cleanup() method.
2014-12-01 18:21:48 -05:00
Selwin Ong 2091c601b1 Merge pull request #451 from conslo/depend-on-unsaved-job-ids
Depend on unsaved job ids
2014-11-26 08:33:05 +07:00
Selwin Ong e3fb606a19 Merge pull request #455 from negz/spotify-freeze
Ensure the FinishedJobRegistry honors an 'infinite' result_ttl of -1
2014-11-26 08:31:44 +07:00
Nic Cope 8fa184b86b Ensure the FinishedJobRegistry honors an 'infinite' result_ttl of -1 2014-11-25 20:30:05 -05:00
Travis Johnson b14f739dfe no need for that save anymore 2014-11-18 12:09:22 -05:00
Travis Johnson af4b0436c1 instantiate a job instead of fetch
this removes the need for the depended on job.id already being saved
2014-11-18 12:09:14 -05:00
Selwin Ong 786d3c5887 Merge pull request #445 from conslo/patch-1
allow depends_on to be a job id or a job itself
2014-11-18 08:27:28 +07:00
Travis Johnson 82729c98dc test for id based job dependancies 2014-11-17 15:22:48 -05:00
Travis Johnson 629b392924 add PyCharm .idea folder to .gitignore 2014-11-17 15:04:58 -05:00
Travis Johnson 14d1186241 use internal job_class for check 2014-11-17 15:04:20 -05:00
Travis Johnson 3467868f1f allow depends_on to be a job id or a job itself
Other parts of the code (i.e.: the `.create()` method) allow the `depends_on` kwarg to be a `Job` object *or* a job id. This is an attempt to allow that same idea within the `.enqueue_call()` method for a queue. Since this part of the code requires actually knowing the precise redis key for the job that's depended on, my intuition is that a `.fetch()` is the only way to solve this.
2014-11-11 15:14:18 -05:00
Selwin Ong 0dbe68527c Merge pull request #431 from negz/worker-redis-bug
Pass the default worker connection into the started and finished registries
2014-11-01 08:42:02 +07:00
Selwin Ong 51f641698d Merge pull request #438 from adamwen829/master
fix issue #437
2014-10-20 11:26:05 +07:00
Adam Wen f5001a0e36 fix decode error in py3. 2014-10-20 10:39:27 +08:00
Adam Wen 1795e1ee53 fix decode 2014-10-16 18:47:32 +08:00
Adam Wen cd0230cae3 make job description unicode friendly 2014-10-16 18:00:48 +08:00
Nic Cope de0b501823 Pass the default worker connection into the started and finished registries
In practice all the registry methods are called with pipelines, but if no
connection is passed in when instantiating the registry and the connection
stack is empty resolve_connection will raise NoRedisConnectionException.
2014-09-29 15:26:11 -04:00
Selwin Ong ae7b5f60db Merge pull request #424 from techtonik/patch-1
README.md: Fix Rescue URL
2014-09-17 22:19:39 +07:00
anatoly techtonik 79f169734a README.md: Fix Rescue URL 2014-09-17 13:53:30 +03:00
Vincent Driessen bc6d30e473 Merge pull request #420 from zhangliyong/cli-rq-worker
Convert `rqworker` to `rq worker` subcommand
2014-09-14 09:58:13 +02:00
zhangliyong 6621105bde Use type instead of default to specify interval option type 2014-09-14 14:47:17 +07:00
zhangliyong 3d49784bcc Merge branch 'master' of github.com:nvie/rq into cli-rq-worker 2014-09-14 14:45:22 +07:00
Vincent Driessen 45ac484c5c Merge pull request #421 from selwin/finished-registry
Added FinishedJobRegistry to monitor/view completed jobs
2014-09-14 09:25:18 +02:00
Selwin Ong 2307bc8253 Added FinishedJobRegistry to monitor finished jobs. 2014-09-14 10:29:17 +07:00
Selwin Ong 74a9982ecb Fixed a bug where expired jobs aren't deleted from JobStartedRegistry. 2014-09-13 17:13:18 +07:00
Selwin Ong 18c6ea64ef Merge pull request #419 from selwin/registry-len
Added JobStartedRegistry.count
2014-09-12 16:01:44 +07:00
zhangliyong f9511664c8 Make flake8 happy :) 2014-09-12 14:28:41 +07:00
zhangliyong 1b39996bf7 Make pep8 2014-09-12 14:28:14 +07:00
zhangliyong 94e494e645 Add testcase for rq worker command 2014-09-12 14:27:29 +07:00
zhangliyong c6033b312e Cleanup 2014-09-12 11:39:14 +07:00
zhangliyong 918403e371 Update test_cli 2014-09-12 11:36:55 +07:00
zhangliyong 6510bb46f3 Fix interval type bug, it should be float 2014-09-12 11:36:13 +07:00
zhangliyong 21c14c0e21 Cleanup 2014-09-12 11:20:08 +07:00
zhangliyong 4d91f136f8 Move redis url default value to connect function
So worker subcommand can retrieve redis url from config file if url
option value is None, otherwise url option value will never be None.
2014-09-12 11:17:30 +07:00
zhangliyong 4df076f3aa Retrieve url from config file 2014-09-12 11:04:22 +07:00
zhangliyong 229a00fee5 Cleanup 2014-09-12 10:57:12 +07:00
zhangliyong 88fe5124d8 Make pythonic 2014-09-12 10:51:39 +07:00
zhangliyong 907e71dc86 Make pythonic 2014-09-12 10:32:48 +07:00
zhangliyong f10c749b7c Use click's evvar to retrieve SENTRY_DSN environment value 2014-09-12 10:30:37 +07:00
zhangliyong 842f27294a Convert rqworker to 'rq worker' subcommand 2014-09-12 10:26:35 +07:00
zhangliyong 7b434a32eb Let cleanup_ghosts accept conn argument 2014-09-12 10:16:28 +07:00
Selwin Ong 202be75b21 Merge pull request #415 from foxx/feature/custom-job-ids
Allow job ID to be set on enqueue/enqueue_call() - fixes #412
2014-09-10 00:42:50 +07:00
Selwin Ong c1dc30eae3 Added __len__ method to Queue. 2014-09-10 00:00:16 +07:00
Selwin Ong fae7df5aa7 Renamed StartedJobRegistry.get_job_count to StartedJobRegistry.count for consistency. 2014-09-09 23:58:35 +07:00
Selwin Ong 41ae1ce8a7 Added a registry.get_job_count(). 2014-09-09 23:54:33 +07:00
Cal Leeming 6aa2e18f88 Another unused import, oops 2014-09-09 17:47:41 +01:00
foxx 30ea76ddd6 Fixed silly typo 2014-09-09 11:12:39 +01:00
foxx 0466562a13 Fixes from comments in #415
Added tox/vagrant tmp dir to gitignore
Removed unused import
Renamed id to job_id in enqueue_call() as per comments in #415
2014-09-09 11:10:18 +01:00
Vincent Driessen 783b6f9ec7 Fix PEP8 complaint. 2014-09-08 20:40:40 +02:00