dependabot[bot]
468eb00c13
Bump actions/setup-python from 3 to 4.1.0 ( #1675 )
...
Bumps [actions/setup-python](https://github.com/actions/setup-python ) from 3 to 4.1.0.
- [Release notes](https://github.com/actions/setup-python/releases )
- [Commits](https://github.com/actions/setup-python/compare/v3...v4.1.0 )
---
updated-dependencies:
- dependency-name: actions/setup-python
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>
2 years ago
Hugo
d5175c38da
Drop python2-specific syntax ( #1674 )
...
* Drop syntax required only for Python 2
* Drop python2-style super() calls
Co-authored-by: Selwin Ong <selwin.ong@gmail.com>
2 years ago
Hugo
61a4a1720b
Use unittest.mock instead of mock ( #1673 )
...
This module has been included in Python itself since 3.3.
Fixes: https://github.com/rq/rq/issues/1646
2 years ago
Selwin Ong
87bacb650e
Jobs that are run synchronously should always raise an exception ( #1671 )
3 years ago
Naveen
aff877cfcf
chore: Enable codeql action ( #1666 )
...
This action runs GitHub's industry-leading semantic code analysis engine,
CodeQL, against a repository's source code to find security vulnerabilities.
https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql
https://github.com/ossf/scorecard/blob/main/docs/checks.md#sast
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
3 years ago
Pavel Levchuk
aff862dd6a
Fix syntax error in docs example ( #1664 )
...
Adds a missing colon in function arguments
3 years ago
dependabot[bot]
a69498e185
Bump actions/setup-python from 2 to 3 ( #1658 )
...
Bumps [actions/setup-python](https://github.com/actions/setup-python ) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases )
- [Commits](https://github.com/actions/setup-python/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/setup-python
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>
3 years ago
Steve Kreitzer
ecf0d06090
Support at_front requeue support ( #1657 )
...
Co-authored-by: Steve Kreitzer <skreitzer@cloudflare.com>
3 years ago
dependabot[bot]
48df759879
Bump codecov/codecov-action from 1 to 3 ( #1660 )
...
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action ) from 1 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases )
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md )
- [Commits](https://github.com/codecov/codecov-action/compare/v1...v3 )
---
updated-dependencies:
- dependency-name: codecov/codecov-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>
3 years ago
dependabot[bot]
a2ada2d1ec
Bump supercharge/redis-github-action from 1.1.0 to 1.4.0 ( #1661 )
...
Bumps [supercharge/redis-github-action](https://github.com/supercharge/redis-github-action ) from 1.1.0 to 1.4.0.
- [Release notes](https://github.com/supercharge/redis-github-action/releases )
- [Changelog](https://github.com/supercharge/redis-github-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/supercharge/redis-github-action/compare/1.1.0...1.4.0 )
---
updated-dependencies:
- dependency-name: supercharge/redis-github-action
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>
3 years ago
dependabot[bot]
ae0611b967
Bump actions/upload-artifact from 2 to 3 ( #1663 )
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
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>
3 years ago
dependabot[bot]
c503823ff8
Bump actions/download-artifact from 2 to 3 ( #1662 )
...
Bumps [actions/download-artifact](https://github.com/actions/download-artifact ) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases )
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/download-artifact
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>
3 years ago
dependabot[bot]
395fd1c51a
Bump actions/checkout from 2 to 3 ( #1659 )
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/checkout
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>
3 years ago
Naveen
4875db7a9c
chore: Included githubactions in the dependabot config ( #1656 )
...
This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure.
Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot
GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
3 years ago
Naveen
adfb355abe
chore: Set permissions for GitHub actions ( #1648 )
...
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ )
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
3 years ago
nevious
5eb2f0b9a4
added ssl support for sentinel connections ( #1649 )
...
Co-authored-by: Christian Schläppi <cschlaeppi@hosttech.ch>
3 years ago
urmikab
f2a3e8d346
Update exceptions.md ( #1655 )
...
Added the import statement for Job (line 18)
3 years ago
Rajesh Khadka
d2dcc2fb6b
fix typo ( #1640 )
3 years ago
Jannis Vajen
8877d0ff52
Update link to Celery website ( #1638 )
...
The old domain has been compromised. See https://github.com/celery/celeryproject/issues/52 for more information.
3 years ago
Mateusz Soszyński
f23c134bfd
Docs: don't break links at the header ( #1636 )
3 years ago
Michael Hill
f4602d30d5
Cross platform simple worker ( #1629 )
...
* Added CrossPlatformDeathPenalty that doesn't rely on signals
* Updated `SimpleWorker`'s `death_penalty_class` to utilize `CrossPlatformDeathPenalty` to allow use on Windows machines
* Changed `CrossPlatformDeathPenalty` to `TimerDeathPenalty`
* Removed overridden `death_penalty_class` in `SimpleWorker` until feature matures
* Added section in testing.md explaining how to utilize `SimpleWorker` on Windows OS
* Replaced usage of chatting with .format for python 3.5 compatibility
* Add tests for new timeout feature
* Explicitly set defaults.CALLBACK_TIMEOUT
* Implemented cross-thread method of raising errors by using ctypes
* Finished writing tests for new TimerDeathPenalty
3 years ago
Selwin Ong
609c068ef8
Add codecov.yml to ignore tests directory
3 years ago
Neptalí Piña
34e2427f67
job decorator allow on_failure and on_success parameters ( #1626 ) ( #1628 )
...
Co-authored-by: neptali <neptali@plerk.io>
3 years ago
Xavier Fernandez
cd17d17d71
rq.worker: remove useless set_state call in horse ( #1618 )
...
* rq.worker: remove useless set_state call in horse
The state should already have been set properly by the worker in
`execute_job`
`prepare_job_execution` is only called by `perform_job` which should only be
called by `main_work_horse`/`fork_work_horse` (themselves only called by `execute_job`).
Let `execute_job` do the bookkeeping.
* worker: update SimpleWorker's state in execute_job
3 years ago
Oscar LAURENT
947f8eed33
Remove root logger usage ( #1617 )
...
The logging root logger was used in the utils which can cause noise when
inspecting logs. Properly defining a logger and using it as is done
everywhere increase consistency to the overall codebase.
Co-authored-by: olaure <o.s.c.l.a.u.r.e.nt@gmail.com>
3 years ago
th3hamm0r
7be119068f
Fixed job not getting enqueued due to parallel modification ( #1615 )
...
The handling of WatchErrors in setup_dependencies() did not reset
the local status of the job, so if, due to parallel processing, all
dependencies get finished while enqueuing the job (causing
WatchError to be raised), the job returned to enqueue_call()
remained in DEFERRED state, which resulted in no execution at all.
3 years ago
th3hamm0r
c5a1ef1734
Fixed wrong keys used to WATCH dependencies ( #1605 )
...
This bug has opened a lot of possible race-conditions, since the
watch-logic from redis did not fail anymore, if dependencies have been
changed in parallel.
3 years ago
Selwin Ong
db445f96b2
Update changelog to mention changes in sync job executions
3 years ago
Kirill Arkhipenko
3f5e94aa8c
fix job.delete with remove_from_queue=False ( #1601 )
3 years ago
Selwin Ong
97caa841ff
Bump version to 1.10.1
3 years ago
Selwin Ong
f14dd9e2d7
Replace highlight tag in docs ( #1600 )
3 years ago
Eric Feldman
93f34c796f
call callbacks and prepare job when running sync ( #1599 )
...
* call signals
* fix lines
* add tests and fix faliure status bug
* bump version
3 years ago
Selwin Ong
0147b30f2b
Fixes a bug that causes leftover job keys when result_ttl=0 ( #1591 )
...
* Fixes a bug that causes leftover job keys when result_ttl=0
* Fixed a buggy worker.maintain_heartbeats() behavior
* Fixed a bug in worker.maintain_heartbeats().
3 years ago
mgcdanny
76ba690aaf
add REDIS_SSL_CERT_REQS cli parameter ( #1495 )
...
* add REDIS_SSL_CERT_REQS cli parameter
* update docs
Co-authored-by: dan <dan@betterfin.com>
3 years ago
rpkak
d813ea5e18
put versions in quotes ( #1572 )
3 years ago
rpkak
6692587f74
Python 3.10 compatibility ( #1563 )
...
* use shutil.get_terminal_size instead of click.get_terminal_size()
resolves warning:
rq/cli/helpers.py:107: DeprecationWarning: 'click.get_terminal_size()' is deprecated and will be removed in Click 8.1. Use 'shutil.get_terminal_size()' instead.
termwidth, _ = click.get_terminal_size()
* remove StrictVersion from rq
* asyncio.get_event_loop -> asyncio.new_event_loop()
resolves warning:
tests/test_job.py::TestJob::test_create_job_with_async
rq/rq/job.py:839: DeprecationWarning: There is no current event loop
loop = asyncio.get_event_loop()
* Add python 3.10 to matrix
Co-authored-by: rpkak <rpkak@users.noreply.github.com>
3 years ago
Josh Cohen
e71fcb952e
Fix `job.cancel` to remove job from registries if not in queue ( #1564 )
...
* Fix `job.cancel` to remove job from registiries if not in queue
* Remove old queue remove call
* Block the ability to cancel job that are already canceled
* Fix py35 compat
* Rename helper method
3 years ago
mike w
47110806d1
bugfix: worker: Launch pubsub thread in `daemon` mode. ( #1559 )
...
In #1496 , we observed a situation where the `work()` method crashes after
`.subscribe()`, but prior to the `try/except` block which normally cleans up
after `.subscribe()`.
Specifically, `.subscribe()` launches a thread in non-daemon mode. Because of
that setting, Python will keep the calling worker process active, even if the
main thread has crashed. This resulted in a syndrome where a worker process was
running, but doing no work.
The change launches this thread in daemon mode, i.e. prevents a "zombie" pubsub
thread from keeping the process up.
(An additional change we could make, discussed in #1496 but deferred, would be
to improve the error handling/trapping scope in `.work()` such that all
failures trigger resource cleanup.)
3 years ago
Josh Cohen
0d69d08126
RPass serializer to queue at cli ( #1556 )
3 years ago
Josh Cohen
a3fba1ca1f
Add missing functionality for CanceledJobRegistry ( #1560 )
3 years ago
luto
9c3afb87e4
Fix link Round Robin / Random worker classes ( #1561 )
3 years ago
Selwin Ong
08a4315e8d
Bump version to 1.10.0
3 years ago
Selwin Ong
cc70cacc1b
Add more tolerance to scheduler heartbeat ( #1555 )
3 years ago
Selwin Ong
c556106a38
Main worker should use zadd(xx=True) to update heartbeat. ( #1550 )
3 years ago
Josh Cohen
bac58f24ca
Add option to enqueue a job's dependents when canceling ( #1549 )
...
* Add option to enqueue a jobs dependents when canceling
* Address @selwin's review
3 years ago
Josh Cohen
b80045d615
Respect serializer ( #1538 )
...
* Add serializer where missing in code
* Fix cli
* Pass option to command
* Add tests for serializer option
* Merge branch 'master' into respect-serializer
- Update enqueue cli to resp. serializer
* Address @selwin's review
3 years ago
Selwin Ong
246d52b977
job.cancel() puts job into CanceledJobRegistry. ( #1546 )
...
* job.cancel() puts job into CanceledJobRegistry.
* Improve test coverage
3 years ago
waldner
31dafb9e5c
Fix repo url for git intallation ( #1545 )
3 years ago
Selwin Ong
e8ec07ed61
Minor changes ( #1544 )
...
* Added test for job timeout
* Added more debugging statements
3 years ago
Selwin Ong
1352465ad1
Fixed SENTINEL docs
3 years ago