18 Commits (4e1eb97056001d1da4f23dc3cfe63e671f15590b)

Author SHA1 Message Date
Thomas Matecki 75644ba948 Multi Dependency Support [Internal API Changes] (#1147)
* Convert `_dependency_id` to `_dependency_ids`

Change `Job`s tracking from a single id of it's dependencies from a single _id_ to a list of _id_s. This change should be private to `Job` - especially leaving `Job#to_dict` and `Job#restore`s treatment of a single 'dependency_id' intact.

This change modifies existing tests.

* Remove reliance upon dependency property in tests

... use dependency.id not  `_dependency_id`

* Re-add assertions for Falsey Values

* Add _dependency_id property

For backwards compatibility with other libs such as django-rq and rq-scheduler
5 years ago
Bartłomiej Biernacki 51efc20371 Add failure_ttl on job decorator (#1130)
Without it you cannot specify custom timeout for failed jobs created using decorator
5 years ago
Darshan Rai ada2ad03ca modify zadd calls for redis-py 3.0 (#1016)
* modify zadd calls for redis-py 3.0

redis-py 3.0 changes the zadd interface that accepts a single
mapping argument that is expected to be a dict.
https://github.com/andymccurdy/redis-py#mset-msetnx-and-zadd

* change FailedQueue.push_job_id to always push a str

redis-py 3.0 does not attempt to cast values to str and is left
to the user.

* remove Redis connection patching

Since in redis-py 3.0, Redis == StrictRedis class, we no longer
need to patch _zadd and other methods.
Ref: https://github.com/rq/rq/pull/1016#issuecomment-441010847
6 years ago
John Lucas 34c403ec8d Add meta to decorator, move depends_on + at_front to decorator (#892) 7 years ago
Jannis Leidel c019662430
Allow passing backend classes (job, queue, worker, connection) from CLI and other APIs
This includes:

- a partial refactor of the CLI to organize the shared options
- extends the tests in areas where passing custom backend classes makes sense
- allow setting the core CLI options as env vars
- minor cosmetic changes here and there
8 years ago
Javi Imbernon 1d6c2b98b7 Add ttl argument to decorator 9 years ago
Vincent Driessen da70ba580b Fix broken import. 11 years ago
Vincent Driessen c5939479b5 Merge remote-tracking branch 'origin/master' into SanyerMyasoedov-master
Conflicts:
	rq/decorators.py
	tests/__init__.py
	tests/test_decorator.py
11 years ago
Vincent Driessen ab9e6b852e Fix PEP8 complaints. 11 years ago
Vincent Driessen 38ec259b6e Enable the most modern Python syntax. 11 years ago
msoedov e76020d894 Removed @resolve_connection from job decorator.
-- resolve_connection already presence inside Queue __init__.
11 years ago
msoedov dd994142b3 Added tests and updated requirements with mock lib. 11 years ago
msoedov 46c96f9481 Added depends_on to job decorator 11 years ago
Vincent Driessen 5e59c6e28e Rename the const. 12 years ago
Scott Burns 538bbb1b55 Decorator accepts result_ttl argument 12 years ago
Vincent Driessen 35dedf3db4 Make test descriptions show up in short (oneliner) mode, as ./run_tests does. 13 years ago
Selwin Ong 8c3292d35b Make "queue" argument in job decorator required.
job decorator now uses Queue's "enqueue_call" method.
13 years ago
Selwin Ong bdc1af28d1 Added a job decorator. 13 years ago