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

Add GoodJob.current_thread_running? and GoodJob.current_thread_shutting_down? for graceful shutdowns #1253

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

bensheldon
Copy link
Owner

@bensheldon bensheldon commented Feb 17, 2024

When called within the context of a performing job, these methods will return the status of thread's scheduler and indicate when it has started a graceful shutdown (this is necessary because GoodJob can contain multiple schedulers that can be independently operated).

Simplest implementation. Looking for feedback on:

  • Naming
  • How this should report when running inline
  • Is a global desired? or would it be better as a job extension with a local good_job_shutting_down? method.

Connects to #1217 1217

@bensheldon bensheldon force-pushed the thread_interruptible branch 2 times, most recently from 4ad1805 to 7b4a3c7 Compare February 29, 2024 00:54
@bensheldon bensheldon changed the title Spike on adding GoodJob.thread_running? and GoodJob.thread_shutting_down? Add GoodJob.current_thread_running? and GoodJob.current_thread_shutting_down? for graceful shutdowns Feb 29, 2024
@bensheldon bensheldon force-pushed the thread_interruptible branch 2 times, most recently from 138878e to b5648f8 Compare February 29, 2024 03:45
@bensheldon bensheldon marked this pull request as ready for review March 1, 2024 03:07
@bensheldon bensheldon added the enhancement New feature or request label Mar 1, 2024
@bensheldon bensheldon merged commit 4961a02 into main Mar 1, 2024
20 checks passed
@bensheldon bensheldon deleted the thread_interruptible branch March 1, 2024 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

1 participant