You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Omer Lachish 76ac0afbcd
Cleanup zombie worker leftovers as part of StartedJobRegistry's cleanup() (#1372)
* cleanup jobs that are not really running due to zombie workers

* remove registry entries for zombie jobs

* return only the job ids on cleanup

* test zombie job cleanup

* format code

* rename variable to explain that second element in tuple is expiry, not score

* remove worker_key

* detect zombie jobs using old heartbeats

* reuse get_expired_job_ids

* set score using current_timestamp

* test idle jobs using stale heartbeats

* extract timeout into variable

* move heartbeats into StartedJobRegistry

* use registry.heartbeat in tests

* remove heartbeats when job removed from StartedJobRegistry

* remove idle and expired jobs from both wip and heartbeats set

* send heartbeat_ttl to registry.add

* typo

* revert everything 😶

* only keep job heartbeats as score (and get rid of job timeouts as scores

* calculate heartbeat_ttl in an overrideable function + override it in SimpleWorker + move storing StartedJobRegistry scores to job.heartbeat()

* set heartbeat to monitoring interval for infinite timeouts

* track elapsed_execution_time as part of worker

* reset current job working time when work on a job is done

* persisting the job working time as part of monitoring
4 years ago
..
config_files RQ v1.0! (#1059) 6 years ago
ssl_config Fix RQScheduler when run with SSL connection (#1383) 4 years ago
__init__.py Fix RQScheduler when run with SSL connection (#1383) 4 years ago
fixtures.py Add runner for asyncio tasks (#1405) 4 years ago
test_cli.py Added --serializer option to cli, finishing off PR #1381 and fix #1357 (#1395) 4 years ago
test_commands.py Add a "stopped" JobStatus and the machinery to properly handle it (#1394) 4 years ago
test_connection.py Fixes Job.fetch when return value is unpickleable (#1184) 5 years ago
test_decorator.py Allow retries to be set through decorator (#1319) 4 years ago
test_fixtures.py Multidependencies (#1397) 4 years ago
test_helpers.py Restored the ability to specify connection params in config 10 years ago
test_job.py Cleanup zombie worker leftovers as part of StartedJobRegistry's cleanup() (#1372) 4 years ago
test_queue.py Added job.worker_name (#1375) 4 years ago
test_registry.py Job retry feature. Docs WIP (#1299) 5 years ago
test_scheduler.py Fix RQScheduler when run with SSL connection (#1383) 4 years ago
test_sentry.py RQ v1.0! (#1059) 6 years ago
test_serializers.py Use pickle.HIGHEST_PROTOCOL by default (#1254) 5 years ago
test_utils.py clean_worker_registry cleans in batches to prevent submitting too muc… (#1390) 4 years ago
test_worker.py Cleanup zombie worker leftovers as part of StartedJobRegistry's cleanup() (#1372) 4 years ago
test_worker_registration.py clean_worker_registry cleans in batches to prevent submitting too muc… (#1390) 4 years ago