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

[occ:bg-job:worker] Add 'stop_after' option #47277

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

julien-nc
Copy link
Member

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.

@julien-nc julien-nc added enhancement 3. to review Waiting for reviews labels Aug 16, 2024
@julien-nc julien-nc added this to the Nextcloud 31 milestone Aug 16, 2024
Copy link
Member

@bigcat88 bigcat88 left a 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

@skjnldsv
Copy link
Member

change commit to feat(occ): add 'stop_after' option to stop the worker after some time maybe?

@julien-nc julien-nc force-pushed the enh/noid/occ-bg-job-worker-max-time branch from 2733477 to 39eeb00 Compare August 16, 2024 14:49
@julien-nc julien-nc enabled auto-merge August 16, 2024 14:49
@julien-nc
Copy link
Member Author

/backport to stable30

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc force-pushed the enh/noid/occ-bg-job-worker-max-time branch from 39eeb00 to 8638f3b Compare August 16, 2024 15:54
@juliusknorr
Copy link
Member

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?

@julien-nc julien-nc merged commit 8d49681 into master Aug 16, 2024
171 checks passed
@julien-nc julien-nc deleted the enh/noid/occ-bg-job-worker-max-time branch August 16, 2024 22:28
@skjnldsv skjnldsv mentioned this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants