531 Commits (master)

Author SHA1 Message Date
Vladimir Ulupov 237e69123a
pass retry param to enqueue_at func ()
Selwin Ong 01d71c8984
Fixes an issue where retried jobs should not be put in FailedJobRegistry ()
Selwin Ong 39fb709c10
get_redis_server_version() should handle 4 digit version numbers ()
nerok 7bf100ebe7
Allow retries to be set through decorator ()
Co-authored-by: Didrik Koren <didrik.koren@uninett.no>
Ruslan Mullakhmetov c2931b45b6
handled unhandled exceptions in horse ()
* handled unhandled exceptions in horse to prevent a job from being silently dropped without going into FailedRegistry

* changes after review

* made sure that work_horse always terminates in a proper way with tests

* minor refactoring

* fix for failing test

* fixes for the other tests

- removed exception handling (done in monitor_work_horse)
- adjusted some tests for the checks that are not relevant anymore

* review suggested changes

* cleanup

Co-authored-by: Ruslan Mullakhmetov <ruslan@twentythree.net>
Selwin Ong 49b156ecc7
Job retry feature. Docs WIP ()
* Initial implementation of Retry class

* Fixes job.refresh() under Python 3.5

* Remove the use of text_type in job.py

* Retry can be scheduled

* monitor_work_horse() should call handle_job_failure() with queue argument.

* Flake8 fixes

* Added docs for job retries
wevsty 4e1eb97056
Split kill_house() fix issues ()
* Split kill_house() fix issues 

Details View issues 

* Removing the catch finally

* rename wait_horse() to wait_for_horse()

* rename wait_horse() to wait_for_horse()

* update test_handle_shutdown_request()

Change test_handle_shutdown_request() exitcode assert

* Restore kill_horse() output

* optimization wait_for_horse()
Paul Spooren 73506b26fc
Add get_job_position and get_position feature ()
Fix 

Signed-off-by: Paul Spooren <mail@aparcar.org>
Selwin Ong 1d8ea8e7a3
Worker key TTLs are set to be a bit longer to account for system hiccups ()
* Worker key TTLs are set to be a bit longer to account for system hiccups

* Fix test_work_horse_force_death
Evan Ackmann bd0fcc1a07
Took into account DST when computing localtime zones. This wasn't ac… ()
* Took into account DST when computing localtime zones.  This wasn't accounted for when using non-UTC datetimes with queue.enqueue_at()

* Updates tests with mocked timezones to test both scenarios
Selwin Ong 21bf5890c0 Merge remote-tracking branch 'origin/master' into multi-dependencies
Bo Bayles f0846a7645
Use pickle.HIGHEST_PROTOCOL by default ()
thomas 0b528dae4b Update Job#dependencies_are_met ...
... such that it fetch all dependency status using SMEMBERS and HGET rather than SORT.
thomas 01ebe25f56 Address Deleted Dependencies
1) Check if `created_at` when checking if dependencies are met.

   If `created_at` is `None` then the job has been deleted. This is sort of hack - we just need one of the fields on the job's hash that is ALWAYS populated. You can persist a job to redis without setting status...

2) Job#fetch_dependencies no longer raises NoSuchJob.

   If one of a job's dependencies has been deleted from Redis, it is not returned from `fetch_dependencies` and no exception is raised.
thomas 9f15df2d55 rename dependencies_finished to dependencies_are_met
Thomas Matecki d5921814e4 Change get_dependency_statuses to dependencies_finished
Convert method on Job to return a boolean and rename. Also use
fetch_many in Queue#enqueue_dependents.
Thomas Matecki a69d91d2b2 Do not watch dependency key set
thomas 4440669f3c Fix patches for python2
thomas 7ea5a32a55 Alway set status 'FINISHED' when job is Successful
Method Queue#enqueue_dependents checks the status of all dependencies of all dependents, and enqueues those dependents for which all dependencies are FINISHED.

The enqueue_dependents method WAS called from Worker#handle_job_success called BEFORE the status of the successful job was set in Redis, so enqueue_dependents explicitly excluded the _successful_ job from interrogation of dependency statuses as the it would never be true in the existing code path, but it was assumed that this would be final status after the current pipeline was executed.

This commit changes Worker#handle_job_success so that it persists the status of the successful job to Redis, everytime a job completes(not only if it has a ttl) and does so before enqueue_dependents is called. This allows for enqueue_dependents to be less reliant on the out of band state of the current _successful job being handled_.
thomas 4a64244f40 Only enqueue dependents for all dependencies are FINISHED
Thomas Matecki ee215a1853 Create get_dependencies_statuses method on Job
This method shall be used in Queue#enqueue_dependendents to determine if all of a dependents' dependencies have been _FINISHED_.
Babatunde Olusola e1cbc3736c
Implement Customizable Serializer Support ()
* Implement Customizable Serializer Support

* Refractor serializer instance methods

* Update tests with other serializers

* Edit function description

* Edit function description

* Raise appropriate exception

* Update tests for better code coverage

* Remove un-used imports and un-necessary code

* Refractor resolve_serializer

* Remove un-necessary alias from imports

* Add documentation

* Refractor tests, improve documentation
Selwin Ong cfe389bd65
FailedJobRegistry.requeue() resets job.started_at and job.ended_at ()
Selwin Ong 636d6d2f54
registry.cleanup() now writes information to job.exc_info ()
Samuel Colvin 4036471203
fixing HerokuWorkerShutdownTestCase after ()
Selwin Ong d8bd455c12
enqueue_at should support explicit args and kwargs ()
Selwin Ong fda4b35f46
Fixes Job.fetch when return value is unpickleable ()
* Fixes Job.fetch when return value is unpickleable

* Fixed connection test in newer versions of Redis
Ivan Kiryanov ed67de22c6 Add job status setting in enqueue_at (and in enqueue_in) methods ()
* Add job status setting in enqueue_at (and in enqueue_in) methods

Update tests for this change
Closes: 

* Add status param to create_job func, rework enqueue_at status setting
Selwin Ong ccfd4a02cb
Failed jobs will now auto expire ()
mr-trouble 5f949f4cef Add a hard kill from the parent process with a 10% increased timeout … ()
* Add a hard kill from the parent process with a 10% increased timeout in case the forked process gets stuck and cannot stop itself.

* Added test for the force kill of the parent process.

* Changed 10% to +1 second, and other misc changes based on review comments.
Selwin Ong baa0cc268a
Job scheduling ()
* First RQScheduler prototype

* WIP job scheduling

* Fixed Python 2.7 tests

* Added ScheduledJobRegistry.get_scheduled_time(job)

* WIP on scheduler's threading mechanism

* Fixed test errors

* Changed scheduler.acquire_locks() to instance method

* Added scheduler.prepare_registries()

* Somewhat working implementation of RQ scheduler

* Only call stop_scheduler if there's a scheduler present

* Use OSError rather than ProcessLookupError for PyPy compatibility

* Added `auto_start` argument to scheduler.acquire_locks()

* Make RQScheduler play better with timezone

* Fixed test error

* Added --with-scheduler flag to rq worker CLI

* Fix tests on Python 2.x

* More Python 2 fixes

* Only call `scheduler.start` if worker is run in non burst mode

* Fixed an issue where running worker with scheduler would fail sometimes

* Make `worker.stop_scheduler()` more resilient to errors

* worker.dequeue_job_and_maintain_ttl() should also periodically run maintenance tasks

* Scheduler can now work with worker in both burst and non burst mode

* Fixed scheduler logging message

* Always log scheduler errors when running

* Improve scheduler error logging message

* Removed testing code

* Scheduler should periodically try to acquire locks for other queues it doesn't have

* Added tests for scheduler.should_reacquire_locks

* Added queue.enqueue_in()

* Fixes queue.enqueue_in() in Python 2.7

* First stab at documenting job scheduling

* Remove unused methods

* Remove Python 2.6 logging compatibility code

* Remove more unused imports

* Added convenience methods to access job registries from queue

* Added test for worker.run_maintenance_tasks()

* Simplify worker.queue_names() and worker.queue_keys()

* Updated changelog to mention RQ's new job scheduling mechanism.
Thomas Matecki 80c82f731f Multi Dependency Support - Registration & Enqueue Call ()
* Multi Dependency Support - Registration & Enqueue Call

Internal API changes to support multiple dependencies.
* Store all of a job's _dependencies_ in a redis set. Delete that set when a job is deleted.
* Add Job#fetch_dependencies method - which return all jobs a job is dependent upon and optionally _WATCHES_ all dependency ids.
* Use Job#fetch_dependencies in Queue#call_enqueue. `fetch_dependencies` now sets WATCH and raises InvalidJobDependency, rather than call_enqueue.

`Queue` and `Job` public APIs still expect single ids of jobs for `depends_on` but internally register them in a way that could support multiple jobs being passed as dependencies.

Next up: need to update Queue#enqueue_dependents

* Use existing fetch_many method to get dependencies.

Modify fetch_dependencies to use fetch_many.

* Remove default value for fetch_many's connection parameter

* PR review housekeeping

* Remove a duplicate test
* Oneline something
* Fix missing colon in dependencies key
* Delete job key, dependents and dependencies at once

* More Fixes From Code Review

Updates to Job, Queue and associated tests.

* When Checking dependencies Avoid, trip to Redis

* When checking the status of a job, we have a 'clean' status of all dependencies(returned from Job#fetch_dependencies) and the job keys are WATCHed, so there's no reason to go back to Redis to get the status _again_.
* Looks as though, the `_status` set in `Job#restore` was bytes while it was converted to text(`as_text`) in `Job#get_status` - for consistency(and tests) converting to text in `restore` as well.
* In `Queue#enqueue_call`, moved WATCH of dependencies_key to before fetching dependencies. This doesn't really matter but seems more _correct_ - one can imagine some rogue API adding a dependency after they've been fetched but before they've been WATCHEed.

* Update Job#get_status to get _local_ status

* If refresh=False is passed, don't get status from Redis; return the value of _status. This is to avoid a trip to Redis if the caller can guarantee that the value of `_status` is _clean_.

* More Fixups

* Expire dependency keys in Job#cleanup
* Consistency in Job#fetch_dependencies
Selwin Ong af678243e1
Added `delete_job` argument to registry.remove()` ()
Yongtao Zhang 5bb03b9c2c Fix rq info not found workers information error, Fixes ()
* Fix rq info not found workers information error, Fixes 

* Add test()
Thomas Matecki 75644ba948 Multi Dependency Support [Internal API Changes] ()
* 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
Vladimir Protasov 8c34e2b353 Store worker's RQ and Python versions ()
* Store worker version to Redis

* Store worker's Python version to Redis

* Store worker version in __init__ body as suggested in review
Vladimir Protasov b62b9b0727 Fix unreliable test ()
Also make error message more useful in case of future failures.
Bartłomiej Biernacki 51efc20371 Add failure_ttl on job decorator ()
Without it you cannot specify custom timeout for failed jobs created using decorator
Selwin Ong d1813cdff9 Fixed test errors caused by _sentry_trace_headers
Selwin Ong f9d42e8a17
Added logging statements to handle_job_success and handle_job_failure ()
Selwin Ong b14c4e288d
Added checks for 0 ttl ()
Selwin Ong 549648bd1b
rq info management command now cleans up registries when first run ()
* rq info management command now cleans up registries when first run

* Deleted print statement

* Improve CLI test coverage

* Fixed CLI test on Linux
Paul Robertson e1c135d4de add the ability to have the worker stop executing after a max amount of jobs ()
* add the ability to have the worker stop executing after a max amount of jobs

* rename to max-jobs

* updated logging messages
Ted Summer 79a6fd7999 Fix timeout adding job to StartedJobRegistry ()
* Fix timeout adding job to StartedJobRegistry

* Fix prepare_job_execution handling neg timeout

* Add test for inf job timeout in StartedJobRegistry

* refactor(worker): simplify checking neg timeout
Selwin Ong 7021cedaf9
Implemented Job.fetch_many ()
Selwin Ong c4cbb3af2f
RQ v1.0! ()
* Added FailedJobRegistry.

* Added job.failure_ttl.

* queue.enqueue() now supports failure_ttl

* Added registry.get_queue().

* FailedJobRegistry.add() now assigns DEFAULT_FAILURE_TTL.

* StartedJobRegistry.cleanup() now moves expired jobs to FailedJobRegistry.

* Failed jobs are now added to FailedJobRegistry.

* Added FailedJobRegistry.requeue()

* Document the new `FailedJobRegistry` and changes in custom exception handler behavior.

* Added worker.disable_default_exception_handler.

* Document --disable-default-exception-handler option.

* Deleted worker.failed_queue.

* Deleted "move_to_failed_queue" exception handler.

* StartedJobRegistry should no longer move jobs to FailedQueue.

* Deleted requeue_job

* Fixed test error.

* Make requeue cli command work with FailedJobRegistry

* Added .pytest_cache to gitignore.

* Custom exception handlers are no longer run in reverse

* Restored requeue_job function

* Removed get_failed_queue

* Deleted FailedQueue

* Updated changelog.

* Document `failure_ttl`

* Updated docs.

* Remove job.status

* Fixed typo in test_registry.py

* Replaced _pipeline() with pipeline()

* FailedJobRegistry no longer fails on redis-py>=3

* Fixes test_clean_registries

* Worker names are now randomized

* Added a note about random worker names in CHANGES.md

* Worker will now stop working when encountering an unhandled exception.

* Worker should reraise SystemExit on cold shutdowns

* Added anchor.js to docs

* Support for Sentry-SDK ()

* Updated RQ to support sentry-sdk

* Document Sentry integration

* Install sentry-sdk before running tests

* Improved rq info CLI command to be more efficient when displaying lar… ()

* Improved rq info CLI command to be more efficient when displaying large number of workers

* Fixed an rq info --by-queue bug

* Fixed worker.total_working_time bug ()

* queue.enqueue() no longer accepts `timeout` argument ()

* Clean worker registry ()

* queue.enqueue() no longer accepts `timeout` argument

* Added clean_worker_registry()

* Show worker hostname and PID on cli ()

* Show worker hostname and PID on cli

* Improve test coverage

* Remove Redis version check when SSL is used

* Bump version to 1.0

* Removed pytest_cache/README.md

* Changed worker logging to use exc_info=True

* Removed unused queue.dequeue()

* Fixed typo in CHANGES.md

* setup_loghandlers() should always call logger.setLevel() if specified
Wolfgang Langner abf6881114 Fix queue default timeout bug. ()
Add test for queue default_timeout.
Wolfgang Langner 8fc987dc68 Make logging in worker consitent. ()
Switch some messages from warn to info because it is normal requested bahavior.
Chyroc 7eb95bf405 refactor: use try ImportError instead of py-version check ()
Finnci 14db0ecd26 Update/add flag for description logging ()
* test workers

* indent

* add docs and add option to the cli

* rename flag for cli

* logging
Samuel Colvin 2f35222ddb skip test_1_sec_shutdown with pypy ()
* skip test_1_sec_shutdown with pypy, fix 

* skip all HerokuWorkerShutdownTestCase with pypy
Darshan Rai ada2ad03ca modify zadd calls for redis-py 3.0 ()
* 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
Selwin Ong 6559b0ffd7
Replace "timeout" argument in queue.enqueue() with "job_timeout" ()
Selwin Ong ad66d872f0 Fixed a unicode test.
Selwin Ong 47d291771f
SimpleWorker's ttl must always be longer than jobs. ()
Paul Robertson e86fb57366 add is_async property to queue ()
chevell c2b939d2df Replace 'async' keyword with 'is_async' for Queue objects ()
* Replaced async keyword with is_async in the Queue class to fix reserved keyword syntax errors in Python 3.7

* Updated tests to use is_async keyword when instantiating Queue objects

* Updated docs to reference is_async keyword for Queue objects

* Updated tox.ini, setup.py and .travis.yml with references to Python 3.7
Theofanis Despoudis 875cc27c2f Using a timeout string value for job works ()
Fixes https://github.com/rq/rq/issues/908
Theofanis Despoudis d6b12c2402 Issue 872 ()
* Fixes  - Use -1 to indicate infinite ttl

* Fixes  Restored comma

*  Code review fix
Selwin Ong 531fde8e3c worker.main_work_horse should always return 0
Thomas Kriechbaumer 3133d94b58 add periodic worker heartbeats ()
* add periodic worker heartbeats

fixes 

* improve worker default option handling
Selwin Ong 63a04d275e Use dbsize() to test for empty Redis database
Selwin Ong c639018fb9 Registry objects can be instantiated by passing a queue object.
stj 487ef72f21 Define redis key prefix as class variable ()
* Define redis key prefix as class variable

Some prefixes were hardcoded in several places. This made it hard to
use custom prefixes via subclasses.

Resolves 

* fixup! Define redis key prefix as class variable
Christophe Olinger a6eb5d37ee Delete dependents of job explicitely ()
* Initial take on delete_dependents

* Add tests including corner cases

* No need to canel dependents since they are not in a queue yet anyway

* The dependents keys can be deleted in all cases

* Update tests to included saved jobs in the deletion tests

* Correctly use pipeline in cancel method

* Unused connection

* Include dependents into dict format of job

* Add TODO

* Address comments from selwin

* Delete dependents key in redis if delete_dependents is called on its own

* Address recent comments from selwin

* Small change to trigger travis

* Remove TODO referring to canceled job state

* Remove dependent_ids from to_dict

* Address recent comments from selwin
Selwin Ong 7a3c85f185
Added the ability to fetch workers by queue ()
* job.exc_info is now compressed.

* job.data is now stored in compressed format.

* Added worker_registration.unregister.

* Added worker_registration.get_keys().

* Modified Worker.all(), Worker.all_keys() and Worker.count() to accept "connection" and "queue" arguments.
John Lucas 34c403ec8d Add meta to decorator, move depends_on + at_front to decorator ()
Samuel Colvin df571e14fd improve logging in worker.py ()
* improve logging in worker

* tests for log_result_lifespan
Selwin Ong f500186f3d
Job compression ()
job.exc_info and job.data is now stored in compressed format in Redis.

* job.data is now stored in compressed format.
vanife ff36e0656e Fixed an issue where `birth` not present in Redis ()
* Fixed an issue where `birth` not present in Redis

Fixed an issue where worker.refresh() may fail if `birth` is not present in Redis

* added test coverage
Selwin Ong 7b9c3b6b66 Fixed an issue where worker.refresh() may fail if last_heartbeat is not present in Redis.
Selwin Ong 1d7b5e834b
Worker statistics ()
* First stab at implementing worker statistics.

* Moved worker data restoration logic to worker.refresh().

* Failed and successfull job counts are now properly incremented.

* Worker now keeps track of total_working_time

* Ensure job.ended_at is set in the case of unhandled job failure.

* handle_job_failure shouldn't crash if job.started_at is not present.
Selwin Ong 92c88d3f4d Merge pull request from theodesp/Issue-731
Fixed  - Support for deleting Queues
Theo c095fe1825 Fixed - Code review issues. Added delete_jobs parameter and pipelining.
Samuel Colvin 260fd84f51 add milliseconds into timestamps, fix
Selwin Ong 19bc288378 Merge pull request from theodesp/Issue-809
Fixed  - Added tests for various cli config parameters
Theo 160fe99323 Fixed - Support for deleting Queues
Theo 0fab93d683 Fixed - Added tests for various cli config parameters
Theo 261f4ac3d5 Fixed - Flak8 errors
Theo 096c5ad3c2 Fixed - Flak8 errors
Samuel Colvin 423da3683c remove python 2.6 support
Theo ee64114e6e Fixed Improved test coverage for connections.py and utils.py
Selwin Ong 0efb87a46b Fixed test error in Python 3.
Selwin Ong 54bc04bb45 job.save() shouldn't crash on unpickleable return value.
Alexey Katichev 09697e567f revert back job.cleanup changes
Alexey Katichev 3596449cc0 remove implicit cleanup call from job.save
Alexey Katichev a0113c83cf introduce job.update_meta() to store updated meta to Redis ()
* introduce job.update_meta() to store updated meta to Redis

This closes 

* rename update_meta to save_meta
Selwin Ong dc45ab8799 Worker.find_by_key should use hmget instead of repeated hget calls. ()
luojiebin cd529d0ce1 Fixed issue#72 ()
* Added a custom exception for timeout transfer

* Added a util to transfer timeout to a united format

* Transfer timeout format when creating a queue or enqueue jobs

* Fixed typos

* Fixed bug in transfer_timeout function

* Added test for function transfer_timeout

* Updated transfer_timeout to allow uppercase unit

* Renamed function in utils
Peng Liu b7d4b4ec1b Solve the UnicodeDecodeError while decode literal things. ()
* Solve the UnicodeDecodeError while decode literal things.

* Add test case for when worker result is a unicode or str object that other than
pure ascii content.
Felipe Lacerda cab89254b5 Make `Queue.enqueue_job()` execute immediately if `async=False` ()
Currently, the job is being performed inside `enqueue_call()`, which
means that `async=False` has no effect if `enqueue_job()` is called
directly. This commit fixes that.
Selwin Ong f6b4c286c9 Merge pull request from jaywink/fix-unicode-decode-error
Fix UnicodeDecodeError when failing jobs
Selwin Ong f760fcb20f job.delete() should cleans itself from FailedQueue and various registries.
Samuel Colvin fd9babe8ce correct heroku worker exit logic
as per @Chronial's comment on b4b99f3
Jason Robinson 213969742e Fix UnicodeDecodeError when failing jobs
Worker handle_exception and move_to_failed_queue couldn't handle a situation where the exception raised had non-ascii characters. This caused a UnicodeDecodeError when trying to format the exception strings.

If on Python 2, ensure strings get decoded before building the exception string.

Closes 
Selwin Ong 83007b2074 Merge pull request from jezdez/backend-class-overrides
Allow passing backend classes from CLI and other APIs
Benjamin Root 30a7ab4899 Add similar test for when the job fails
Benjamin Root f68aeff481 Added integration test for the metadata persistence feature
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
Jannis Leidel 27e4f3a768
Small refactor to simplify registry key setup.
Samuel Colvin 763a304ec6 cope with python 2.6 yawwwwwwn
Samuel Colvin f50bdb31bf skip test_run_scheduled_access_self on pypy
Samuel Colvin b4b99f30b0 allow for already dead horse on heroku worker termination
Julien Surloppe dc3bba9362 Another check on failed status and test
Selwin Ong 2428370dfd Merge pull request from jezdez/skip-heroku-macos
Stop running some Heroku tests on macOS since it’s missing the appropriate signals
Jannis Leidel fcec17c8e1
Stop running some Heroku tests on macOS since it’s missing the appropriate signals
Refs issue .
Stefan Hammer f9bff3d12b Merge branch 'master' into 739_fix_race_condition
Vincent Driessen af6ce54ea4 Fix PEP8 complaints
Stefan Hammer a0cee2d2a0 refactored worker code
Moved code into a new handle_job_success() method and reduced context of used
pipelines.
Samuel Colvin afc7469c27 fetch_job - check correct queue, fix
Stefan Hammer 301e5c927b Raise an exception if a given dependency does not exist
Adapted some tests to the change: the dependency has to be saved first.
Stefan Hammer 44f98693c7 added a test for the race condition
Samuel Colvin bbf50f4893 use compat for PY2 test and add tests
Yannis Spiliopoulos 4a8aa0921f Set test timeout to original value
Yannis Spiliopoulos fbb29ec333 Investigating timeouts
Yannis Spiliopoulos 94d5caed15 Make clearer the puprose of test
Yannis Spiliopoulos 3362fe2ba5 Test killing work_horse after we start monitoring
Yannis Spiliopoulos c00d3681f9 Failing test to demonstrate issue
Test that demonstrates that if a work-horse process is terminated unexpectedly
the job being processed could be stuck at the "Started" state
(https://github.com/nvie/rq/issues/702)
Samuel Colvin 0e26db9e08 correct wording in docstring and tests
Samuel Colvin 9f9c887645 better function names and process double SIGRTMIN
Samuel Colvin 2b544e5b17 add tests to HerokuWorker
Arnold Krille 8e99706b16 run python 3.5 on travis, adopt timeouts
Also
- Report the five slowest tests to watch for risk of timeout
- Double timeouts.
  Maybe that helps pypy on travis to finish successfully.
Arnold Krille df22f127eb Test the worker in its own subprocess
- run with an empty queue
- schedule one job (which uses get_current_connection and get_current_job) and
run `rqworker`
- schedule a job that itself schedules `access_self` and run `rqworker`
- Make sure the job didn't fail by assuring the failed queue is still empty
  afterwards.
- Install this package locally when running in travis.
  This actually unifies the behaviour of tox and travis as tox also builds the
  package and then installs it into each test environment.
- fix flake8 (as run by tox)
Javier Lopez e92b57d128 test_job.py: Add cancel test on failed queue
Selwin Ong 766bb60006 Merge branch 'dependent-jobs-with-result-ttl'
Selwin Ong e9d227c3df Dependent jobs are now correctly enqueued even if their parent jobs have result_ttl=0.
Selwin Ong 8b7b0e5584 Merge pull request from jlopex/javi/fix_issue_700
Fixes issue 
Javier Lopez 091c2568c9 test_job.py: Add test for cancel_job function
amyangfei 724c844378 Don't call job.cancel if job has finished
Arnold Krille 9df0a853d8 Fix indentation and newlines according to flake8
Selwin Ong e1e4c00a67 Merge pull request from javimb/javimb/decorator-ttl
Add ttl argument to decorator
Antoine Leclair 81679a35d9 Merge branch 'master' into custom-queue-class
Conflicts:
	tests/test_worker.py
Javi Imbernon 1d6c2b98b7 Add ttl argument to decorator
Antoine Leclair cc1eb9c52b Remove test that failed on Travis CI
Antoine Leclair 173417f337 Remove test that failed on Travis CI
Antoine Leclair 05ed85804c Worker accepts custom queue class
Antoine Leclair 7275f62737 Add tests for custom job class in worker
Antoine Leclair 5c72417cda Do not use deprecated assertEquals
Antoine Leclair 2f36cedd50 Typo in test docstring
Selwin Ong 640b2e31a0 Merge pull request from olingerc/warmshutdown
Save date on which a busy worker receives a warm shutdown request
orangain e8165fdddf Accept byte strings as the first argument of Worker() in Python 2
This make it easy to write Python 2/3 compatible code.
e.g.

    Worker(sys.argv[1:])

    # Without from __future__ import unicode_literals
    Worker(['high', 'normal', 'low'])
Eduard Carreras 89facfada6 Test to ensure job is finished in not async mode
Christophe Olinger b47c8efe27 Add test cases for shutdown_requested_date
Christophe Olinger 3e586bd6d6 Add remove current_job based on the correct upstream master branch
Selwin Ong 2485334100 Merge pull request from tornstrom/master
Allow meta when enqueing
Tornstrom 50a114a0a8 Allow meta when enqueing
Selwin Ong 5afd1a90e5 Merge pull request from samuelcolvin/job-started_at
add job.started_at
Selwin Ong 8bbd833855 Merge pull request from glaslos/cancel_remove
Cancel and Delete differences
ahxxm b06f112cb0 fix tests
syntax: assertEquals -> assertEqual, assertNotEquals -> assertNotEqual
usage: status of worker and job now will use get/set method instead of property method
glaslos 0a6df13d9d delete dependents and delete in cleanup. Fixed tests.