summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update cli.py to support custom loggers (#1906)HEADmasterjuur2023-05-184-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update cli.py to support custom loggers Allows a config.py file (via rq worker --config) to support things like this for logfmt logging: DICT_CONFIG = { "version": 1, "formatters": {"logfmt": { "()": "logfmter.Logfmter", "keys": ["level","when","pid"], "mapping": {"level":"levelname","when":"asctime","pid":"process"}, "datefmt": "%Y-%m-%dT%H:%M:%S%z" }}, "handlers": {"console": {"class": "logging.StreamHandler","formatter": "logfmt" }}, "loggers": { "root": {"handlers":["console"], "level": "INFO"}, "rq": {"handlers":["console"], "level": "INFO", "propagate": False}, } } * added simple test and documentation for DICT_CONFIG * further attempt to get testing right for dictConfig * move import to correct location * fix * remove meaningless options.get() usage * linting checks and added missing test config file
* Scheduler should release and heartbeat only acquired locks (#1914)xzander2023-05-182-7/+42
| | | | | | | * Scheduler should release and heartbeat only acquired locks. * Added tests for heartbeat and release only acquired locks. * Changed test description to correct one.
* Update linting configuration (#1915)Rob Hudson2023-05-1756-386/+344
| | | | | | | | | * 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
* Bump docker/build-push-action from 2 to 4 (#1913)dependabot[bot]2023-05-161-1/+1
| | | | | | | | | | | | | | | Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 4. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2...v4) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Stop calling deprecated function (#1908)Tom Hamilton Stubber2023-05-144-13/+17
|
* [Chore] Fix test suite (#1895)Cyril Chapellier2023-05-132-0/+20
| | | | | * fix: tests suite * chore: add SSL tests
* Bump version to 1.14.1v1.14.1Selwin Ong2023-05-052-1/+5
|
* [Hotfix] Fix SSL connection for scheduler (#1894)Cyril Chapellier2023-05-055-30/+27
| | | | | * fix: ssl * fix: reinstate a test for parse_connection
* Catch serializer TypeError Exception (#1872)gabriels12342023-05-032-1/+21
| | | | | * Catch serializer TypeError Exception * Add test for unserializable job.meta
* Deleted redundant requirements from dev-requirements.txtSelwin Ong2023-05-032-5/+1
|
* Coverage fixes (#1890)Selwin Ong2023-05-033-4/+52
| | | | | | | | | | | | | | | | | | | | | | | * Don't fail CI if codecov fails * Remove codecov from dev-requirements.txt * Pin packaging dependency to 21.3 * Pin coverage to 6.5.0 * Pin coverage to 6.2 * Downgrade packaging * Drop Python 3.6 from test matrix * Reenable Python 3.6 in tests * Downgrade coverage req * Make a different dev-requirements file for Python 3.6 * Moved dev-requirements-36 to root dir
* Merge branch 'master' of github.com:rq/rqv1.14Selwin Ong2023-05-0123-921/+1518
|\
| * Worker pool (#1874)Selwin Ong2023-05-0123-921/+1518
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * First stab at implementating worker pool * Use process.is_alive() to check whether a process is still live * Handle shutdown signal * Check worker loop done * First working version of `WorkerPool`. * Added test for check_workers() * Added test for pool.start() * Better shutdown process * Comment out test_start() to see if it fixes CI * Make tests pass * Make CI pass * Comment out some tests * Comment out more tests * Re-enable a test * Re-enable another test * Uncomment check_workers test * Added run_worker test * Minor modification to dead worker detection * More test cases * Better process name for workers * Added back pool.stop_workers() when signal is received * Cleaned up cli.py * WIP on worker-pool command * Fix test * Test that worker pool ignores consecutive shutdown signals * Added test for worker-pool CLI command. * Added timeout to CI jobs * Fix worker pool test * Comment out test_scheduler.py * Fixed worker-pool in burst mode * Increase test coverage * Exclude tests directory from coverage.py * Improve test coverage * Renamed `Pool(num_workers=2) to `Pool(size=2)` * Revert "Renamed `Pool(num_workers=2) to `Pool(size=2)`" This reverts commit a1306f89ad0d8686c6bde447bff75e2f71f0733b. * Renamed Pool to WorkerPool * Added a new TestCase that doesn't use LocalStack * Added job_class, worker_class and serializer arguments to WorkerPool * Use parse_connection() in WorkerPool.__init__ * Added CLI arguments for worker-pool * Minor WorkerPool and test fixes * Fixed failing CLI test * Document WorkerPool
* | Bump version to 0.14.0Selwin Ong2023-05-012-2/+2
|/
* Added changelogSelwin Ong2023-05-012-2/+18
|
* [Results] Allow unserializable return values (#1888)Cyril Chapellier2023-05-014-3/+32
| | | | | * fix: allow unserializable return values * fix: review comments
* Added BaseWorker class (#1887)Selwin Ong2023-04-266-276/+301
| | | | | | | | | | | | | * Added BaseWorker class * Moved logging related functions to logutils * Remove uneeded colorize function * Updated worker.get_current_job_id() to not fail when job ID is None * job.restore() shouldn't crash if is not present * Fix various as_text() related crashes
* Update `push_job_id` debug string when using pipelines (#1886)Rob Hudson2023-04-261-4/+6
|
* Added parse_connection function (#1884)Selwin Ong2023-04-254-36/+101
| | | | | | | | | | | * Added parse_connection function * feat: allow custom connection pool class (#1885) * Added test for SSL --------- Co-authored-by: Cyril Chapellier <tchapi@users.noreply.github.com>
* Exclude tests directory from coverage.pySelwin Ong2023-04-251-0/+1
|
* Exclude tests dir from coverage.py (#1883)Selwin Ong2023-04-231-0/+1
|
* Add py.typed for PEP561 compliance (#1882)nhairs2023-04-232-0/+1
|
* Bump actions/setup-python from 4.5.0 to 4.6.0 (#1880)dependabot[bot]2023-04-233-4/+4
| | | | | | | | | | | | | | | Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.5.0 to 4.6.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4.5.0...v4.6.0) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Cleaned up cli.py (#1876)Selwin Ong2023-04-082-80/+98
|
* Ignore `if TYPE_CHECKING:` when measuring test coverage (#1875)Selwin Ong2023-04-081-0/+4
| | | | | | | | | | | * Ignore `if TYPE_CHECKING:` when measuring test coverage * Update codecov.yml instead * Added "[report]" to coveragerc * Revert "Update codecov.yml instead" This reverts commit f68a905de447ba947a46fcd4ef7c20824262d187.
* Better process name for workersSelwin Ong2023-04-071-1/+1
|
* improve the docs on in-flight jobs of killed/lost workers (#1840)luto2023-04-011-3/+5
| | | | | | | * improve the docs on in-flight jobs of killed/lost workers * improve the docs on in-flight jobs of killed/lost workers * document abandoned job behavior before 0.14
* Added job details to "rq info" command (#1869)Tianci Hu Marrero2023-04-011-4/+14
| | | | | | | * Update index.md fixed minor duplicate article ("the its config var") * added job details to rq info cli
* Fix error in example in the documentation (#1870)Joris2023-04-011-4/+4
| | | The solution that @rpkak proposes works. Closes #1524
* Consolidate job callbacks execution (#1851)Rony Lutsky2023-03-2113-69/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * consolidate job failure callback execution * fix * success callback as well * merge fix * create Callback class and change how callbacks serde * deprecation * add tests * string format * pr fix * revert serialization changes * fix timeout typing * add documentation * add test * fix a bug * fix tests * move job heartbeat call to worker and make sure there is always a callback timeout * fix test * fix test
* Fix typo in deprecation warning (#1866)Jochen Kupperschmidt2023-03-121-1/+1
| | | Help when grepping through warnings.
* Check dependencies when enqueue via Queue.enqueue_job() (#1837)Simó Albert i Beltran2023-03-095-13/+45
| | | | | | | | | | | | | | | * test: check dependencies when enqueue via Queue.enqueue_job() Signed-off-by: Simó Albert i Beltran <sim6@bona.gent> * fix: check dependencies when enqueue via Queue.enqueue_job() Signed-off-by: Simó Albert i Beltran <sim6@bona.gent> Co-authored-by: Selwin Ong <selwin.ong@gmail.com> --------- Signed-off-by: Simó Albert i Beltran <sim6@bona.gent> Co-authored-by: Selwin Ong <selwin.ong@gmail.com>
* fix: remove unsafe formating and standardize qoutes (#1857)Jesse P. Johnson2023-03-083-30/+31
| | | | | * test: resolve merge issues * test: resolve merge issues
* bugfix: type annotations as str to allow Windows usage (#1852)lowercase002023-03-081-3/+6
|
* refactor: remove python2 cruft (#1863)Jesse P. Johnson2023-03-083-26/+2
|
* docs: add deprecation warnings to connection functions (#1860)lowercase002023-03-081-4/+24
|
* Remove `use_connection` (#1859)lowercase002023-03-074-100/+22
| | | | | * feat: remove use_connection * fix: clear old test
* Update arguments passed to the Sentinel Object when created from the ↵Joachim Burket2023-03-073-14/+74
| | | | | | | | | | | | | | | | | settings (#1850) * Updated arguments passed to the Sentinel Object when created from the settings - added `USERNAME` key - added `CONNECTION_KWARGS` key to allow passing additionals arguments to the Redis connections - updated the documentation * added missing comma * tests(helpers): Added tests for Sentinel --------- Co-authored-by: Joachim Burket <joachim.burket@hopitalvs.ch>
* feat: move `reorder_queues` to `dequeue_job` (#1853)lowercase002023-03-071-1/+1
| | | | | * feat: move `reorder_queues` to `dequeue_job` * Update worker.py
* Update index.md (#1858)Tianci Hu Marrero2023-03-071-1/+1
| | | fixed minor duplicate article ("the its config var")
* New dequeue strategy (#1806)lowercase002023-03-0511-29/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New dequeue strategy This implements a new parameter `dequeue_strategy` that should replace the `RoundRobinWorker` and `RandomWorker`. Changes includes: feature, docs, tests, deprecation warning. * Fix dequeue strategy name * Black & Fix warning * feat: tests, warnings, refactor naming * feat: improve worker check * fix: revert to str subclass * fix: dequeue strategy into bootstrap * org: move DequeueStrategy to worker * refactor: round robin naming * fix: naming * fix: type annotation * fix: typo * refactor: remove kwarg from worker's init * fix: typo * move `dequeue_strategy` from `bootstrap()` into `work()`
* Add failure callback call to started job registry cleanup (#1824)Rony Lutsky2023-03-045-13/+52
| | | | | | | | | | | | | | | * Add started job registry cleanup job failure callback call * WIP - need to fix test * fix test * rename, tests and docs * better log message * use class name * Update registry.py
* docs: scheduler safe import (#1835)lowercase002023-03-031-1/+22
| | | | | * docs: scheduler safe import * docs: rollback main block
* Fix TimerDeathPenalty not properly handling negative/infinite timeout (#1845)Marcus Ong2023-03-032-0/+11
| | | | | | | | | * Fix TimerDeathPenalty not properly handling negative/infinite timeout * revert back to using exc_info --------- Co-authored-by: Marcus <marcus@us2.ai>
* fix: Dependency list in depends_on (#1843)Simó Albert i Beltran2023-02-282-6/+24
| | | | | | | | | | | | | * test: Dependency list in depends_on Signed-off-by: Simó Albert i Beltran <sim6@bona.gent> * fix: Dependency list in depends_on Signed-off-by: Simó Albert i Beltran <sim6@bona.gent> --------- Signed-off-by: Simó Albert i Beltran <sim6@bona.gent>
* (Docs) Updated patterns - heroku (#1841)Tianci Hu Marrero2023-02-271-10/+11
| | | | | | | | | * Update index.md * Update index.md * Update index.md import herokuWorker instead.
* removed import error warning and changed function doc (#1839)amks12023-02-261-5/+1
|
* docs: add warning of `decode_responses` (#1833)lowercase002023-02-261-0/+14
|
* Don't fail CI if codecov fails (#1838)Selwin Ong2023-02-261-0/+1
|
* Worker - max_idle_time feature (#1795)Rony Lutsky2023-02-224-8/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix accessing None when dequeued result is None (burst=True, or timeout=None) * add a test * implement + tests * fix if * adjust test * merge * test * test * merge master * take max_idle_time into account for dequeue_timeout * refactor a bit * potential bug fix * tests * math.ceil * buffer tests