* Use lmove() when working on a single queue
* Skip reliable queue tests if Redis server doesn't support LMOVE
* Better test coverage
* job.origin should be string
* Added test for job that gets orphaned if worker.execute_job() fails
* Fix job tests
* worker.run_maintenance_tasks() now cleans intermediate queues
* Fixed import ordering
* No need to run slow tests and flake8 on SSL tests
* Minor typing fixes
* Fixed linting
* setup: read requirements.txt for dependencies
This makes it easier to keep required packages in sync.
Signed-off-by: Paul Spooren <mail@aparcar.org>
* requirements: Update to click 5.0 and redis 3.5.0
Click 5.0 was already required by the `setup.py` and is not brought in
sync. Redis Python library 3.5.0 introduces the `HSET` command with
mapping support which replaces the previous `hmset`. By lifting the
minimal required version to 3.5.0 we can remove the combat function if
Redis server 4.0 is guaranteed.
Signed-off-by: Paul Spooren <mail@aparcar.org>
* ci: remove Python3.4 testing
`redis-py` 3.5.0 does no longer support Python 3.4, so drop it in CI.
Signed-off-by: Paul Spooren <mail@aparcar.org>
* 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
This reverts commit 1ab8c19696 and
reintroduces all changes made by @dstufft.
Still, it needs more patches to reeanble the default log-to-console
behaviour. See #121.