-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[occ:bg-job:worker] Add 'stop_after' option #47277
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this should be backported in Nextcloud 30
change commit to |
2733477
to
39eeb00
Compare
/backport to stable30 |
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
39eeb00
to
8638f3b
Compare
Maybe something for later but wouldn't it be possible to detect if any app version changed and only exit in that case? Similar how we build the cache buster for frontend assets based on the server and all app versions? |
If the
stop_after
option is set, the worker will stop itself after the time set with the option value.As the worker does not update the loaded code (after an app upgrade for example) and the app setting values, we will recommend to regularly restart it. This option makes it possible to stop the worker after some time while it is not running a job.
IMO this should be backported to 30 as the worker is less useful without this option.