Commit Graph

4 Commits

Author SHA1 Message Date
Selwin Ong 3c89f9dada
Job with multiple executions (#1964)
* Initial work on Execution class

* Executions are now created and deleted when jobs are performed

* Added execution.heartbeat()

* Added a way to get execution IDs from execution registry

* Job.fetch should also support execution composite key

* Added ExecutionRegistry.get_executions()

* execution.heartbeat() now also updates StartedJobRegistry

* Added job.get_executions()

* Added worker.prepare_execution()

* Simplified start_worker function in fixtures.py

* Minor test fixes

* Black

* Fixed a failing shutdown test

* Removed Execution.create from worker.prepare_job_execution

* Fix Sentry test

* Minor fixes

* Better test coverage

* Readded back worker.set_current_job_working_time()

* Reverse the order of handle_exception and handle_job_failure

* Fix SSL test

* job.delete() also deletes executions.

* Set job._status to FAILED as soon as job raises an exception

* Exclusively use execution.composite_key in StartedJobRegistry

* Use codecov v3

* Format with black

* Remove print statement

* Remove Redis server 3 from tests

* Remove support for Redis server < 4

* Fixed ruff warnings

* Added tests and remove unused code

* Linting fixes
2023-11-03 17:05:59 +07:00
Rob Hudson 9933128dd2
Store project metadata in pyproject.toml (PEP 621) (#1952) 2023-07-09 17:34:25 +07:00
Rob Hudson ea063edf0a
Update linting configuration (#1915)
* Update linting configuration

This removes flake8 in favor of ruff, which also provides isort support, and
updates all files to be black, isort, and ruff compliant. This also adds black
and ruff checks to the tox and Github linting workflow.

* Tweak the code coverage config and calls
2023-05-17 23:19:14 +07:00
Selwin Ong 46b5cf64c3
Added black config (#1815) 2023-02-14 07:47:52 +07:00