Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

worker: finish all opened tasks and reexec on SIGHUP #245

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

lzaoral
Copy link
Contributor

@lzaoral lzaoral commented Jan 12, 2024

This feature implements safe reloading of updated configuration or updated source code, e.g. with systemctl reload.

lzaoral added a commit to lzaoral/openscanhub that referenced this pull request Jan 15, 2024
@lzaoral lzaoral marked this pull request as ready for review January 15, 2024 11:53
kobo/worker/main.py Outdated Show resolved Hide resolved
@lzaoral lzaoral marked this pull request as draft January 17, 2024 17:21
@lzaoral lzaoral force-pushed the reload-on-sighup branch from d3790bf to 4bcc950 Compare March 6, 2024 11:27
@lzaoral lzaoral requested a review from rohanpm March 12, 2024 16:03
@lzaoral lzaoral marked this pull request as ready for review March 12, 2024 16:03
@lzaoral lzaoral marked this pull request as draft March 13, 2024 09:04
This feature implements safe reloading of updated configuration or updated
source code, e.g. with `systemctl reload`.

The reexec won't be performed when SIGHUP is followed by SIGTERM, SIGINT
or explicit shutdown by the `ShutdownWorker` task.

The unit tests must use `mock.ANY` instead of the actual signal handler
because it is impossible to reference a nested closure outside of its own
scope.
@lzaoral lzaoral marked this pull request as ready for review March 15, 2024 09:56
lzaoral added a commit to lzaoral/openscanhub that referenced this pull request Mar 15, 2024
@rohanpm rohanpm merged commit 869eb93 into release-engineering:master Mar 18, 2024
19 checks passed
@lzaoral lzaoral deleted the reload-on-sighup branch March 18, 2024 07:23
lzaoral added a commit to lzaoral/openscanhub that referenced this pull request Mar 20, 2024
This requires python3-kobo-worker 0.36.0 or newer.

Related: release-engineering/kobo#245
lzaoral added a commit to lzaoral/openscanhub that referenced this pull request Mar 28, 2024
This requires python3-kobo-worker 0.36.0 or newer.

Related: release-engineering/kobo#245
lzaoral added a commit to lzaoral/openscanhub that referenced this pull request May 3, 2024
This requires python3-kobo-worker 0.36.0 or newer.

Related: release-engineering/kobo#245
lzaoral added a commit to lzaoral/openscanhub that referenced this pull request May 3, 2024
This requires python3-kobo-worker 0.36.1 or newer.

Related: release-engineering/kobo#245
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants