1787 Commits (master)
 

Author SHA1 Message Date
Konstantin Schubert b334a00f07
Fix comment in registry.py (#1285) 5 years ago
Selwin Ong c3a6b537de Bump version in version.py 5 years ago
Selwin Ong 819c61be9b Bump version to 1.4.3 5 years ago
Selwin Ong 34eec5fee5
worker.register_birth() should set a slightly longer worker key TTL (#1284) 5 years ago
Pranav Gupta 2fdff2471c
updated readme with link to monitoring dashboards (#1274)
* updated readme with link to monitoring dashboards

* added links to more rq related projects
5 years ago
Paul Spooren 73506b26fc
Add get_job_position and get_position feature (#1271)
Fix #1197

Signed-off-by: Paul Spooren <mail@aparcar.org>
5 years ago
Paul Spooren e8795f941a
Delete run_tests (#1281)
The file is obsolete and `pytest` should be used directly.
5 years ago
Selwin Ong 1d8ea8e7a3
Worker key TTLs are set to be a bit longer to account for system hiccups (#1279)
* Worker key TTLs are set to be a bit longer to account for system hiccups

* Fix test_work_horse_force_death
5 years ago
JhonnyBn 6eec0065df
Truncate job args/kwargs to a reasonable length (#1277)
* Truncate job args/kwargs to a reasonable length

* fix
5 years ago
ericatkin 29222ea12f
Job.requeue() doesn't return the job (#1265) 5 years ago
Selwin Ong 23d43874b6 Bump version to 1.4.2 5 years ago
Selwin Ong 6a9aa1f81a
Attempt to fix hmset command for Redis < 4.0 (#1260)
* Attempt to fix hmset command for Redis < 4.0

* Temporarily commented out hset(key, mapping) for backward compatibility reasons.
5 years ago
Evan Ackmann bd0fcc1a07
Took into account DST when computing localtime zones. This wasn't ac… (#1258)
* 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
5 years ago
Selwin Ong 91a22949c6
Merge pull request #1259 from rq/multi-dependencies
Multi dependencies
5 years ago
Selwin Ong ec2f8cb4ed Don't try to import cPickle 5 years ago
Selwin Ong 21bf5890c0 Merge remote-tracking branch 'origin/master' into multi-dependencies 5 years ago
Selwin Ong 52e426f40f Remove Python 2.7 from setup.py 5 years ago
Selwin Ong 4d450ec94d Bump version to 1.4.1 5 years ago
Bo Bayles f0846a7645
Use pickle.HIGHEST_PROTOCOL by default (#1254) 5 years ago
Bo Bayles 5859339a51
Avoid deprecation warnings on redis-py 3.5.0 hmset (#1253) 5 years ago
thomas 33e4beacf4 pipeline calls to get dependency statuses 5 years ago
Selwin Ong e6e5703f28 Merge branch 'master' of github.com:rq/rq 5 years ago
Selwin Ong 02eb983e90 Bump version to 1.4.0 5 years ago
Michael Angeletti 6ab6a0a573
Remove extraneous try/except (#1247)
The exception handling block was raising the caught exception in-place, which caused the original traceback info to be lost. Rather than replace `raise e` with `raise`, I simply removed the whole try / except, since no action was being taken in the except block.
5 years ago
Selwin Ong 9d6f38df0e Slightly increase job key timeout in monitor_work_horse() 5 years ago
grayshirt d8dea02081
Parse job_id as keyword argument to delay() (#1236) (#1243) 5 years ago
Vincent Jacques 9fb80424ef
Fix typo in scheduling doc (#1245) 5 years ago
rmartin48 a922a553cb
Always set job.started_at in monitor_work_horse (#1242)
Co-authored-by: Russell Martin <russell@divipay.io>
5 years ago
Prajjwal Nijhara b2be17417f
Fix some code quality issues (#1235) 5 years ago
thomas 0b528dae4b Update Job#dependencies_are_met ...
... such that it fetch all dependency status using SMEMBERS and HGET rather than SORT.
5 years ago
Pierre Mdawar eb92d688a8
Add the queue to the Redis queues set when scheduling a job (#1238)
* Add the queue to the queues set when scheduling a job

* Fix the registry properties docstrings
5 years ago
Thomas Matecki 0672cd00c6 Revisions
* Rename `dependent_jobs` to `jobs_to_enqueue` in queue.py
* Rename `dependencies_job_ids` to `dependency_ids`.
* Remove `as_text` (no more python2 support). Use `bytes.decode`
5 years ago
Thomas Matecki c679c1af2f Change parameter name from `exclude` ...
...to `exclude_job_id`. Also make it a single id not a set.
5 years ago
thomas c0119a8a19 Undo formatting for coverage stats 5 years ago
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.
5 years ago
thomas 83fa6b2386 Revert move of status update in `Worker#handle_job_success`
When a job with dependents is _successful_ it's dependents are enqueued. Only if the FINISHing job's `result_ttl` is non-zero is the change in status persisted in Redis - that is, when each dependent job is enqueued, the _FINISHing_ job (,triggering the enqueueing,) has an _outdated_ status in redis. This avoids redundant call because if `result_ttl=0` then the job is deleted then deleted in `Job#cleanup`.

In order to enqueue the dependents, we therefore _exclude_ the FINISHing job from the check if each dependents' dependencies have been met.
5 years ago
thomas 9f15df2d55 rename dependencies_finished to dependencies_are_met 5 years ago
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.
5 years ago
Thomas Matecki a69d91d2b2 Do not watch dependency key set 5 years ago
thomas 540be93401 Undo extra formatting changes 5 years ago
thomas 4440669f3c Fix patches for python2 5 years ago
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_.
5 years ago
thomas 4a64244f40 Only enqueue dependents for all dependencies are FINISHED 5 years ago
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_.
5 years ago
Pierre Mdawar 0dd9ff0ec9
Accept lowercase logging level names and accept tuples when setting exception handlers (#1233)
* Accept lowercase logging level names

* Accept both lists and tuples when setting Worker exception_handlers
5 years ago
Babatunde Olusola e1cbc3736c
Implement Customizable Serializer Support (#1219)
* 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
5 years ago
Paweł Bąk d914343e7c
Add sentry_debug and sentry_ca_certs params (#1229)
Co-authored-by: pawel bak <p.bak@inteliclinic.com>
5 years ago
Selwin Ong cfe389bd65
FailedJobRegistry.requeue() resets job.started_at and job.ended_at (#1227) 5 years ago
Selwin Ong 636d6d2f54
registry.cleanup() now writes information to job.exc_info (#1226) 5 years ago
Selwin Ong a090e9e840
Remove unused code (#1214) 5 years ago