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

Always instantiate MultiScheduler; delegate Scheduler Metrics to JobPerformer #1147

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

bensheldon
Copy link
Owner

This always instantiates a MultiScheduler, even if there is configured only a single thread pool.

Moves the Metrics into the JobPerformer, which is intended to be aware of jobs and their meaning. My vision for the Scheduler is that it should be largely ignorant/generic of what it executes or the result, but that vision has slipped; this tries to move it back in that direction. This also adds a few more metrics, tracking:

  • queue_check_at: the last time the queue was checked for jobs
  • execution_at: the last time a execution/job was dequeued or finished

(These are in support of #1146)

And removes unexecutable_executions_count because I think it wasn't tracking anything.

@bensheldon bensheldon changed the title Always use MultiScheduler(instead of _either_ MultiScheduler or single Scheduler); Delegate Scheduler Metrics to JobPerformer Always use MultiScheduler(instead of either MultiScheduler or single Scheduler); Delegate Scheduler Metrics to JobPerformer Nov 10, 2023
@bensheldon bensheldon added the refactor Code changes that do not introduce new features label Nov 10, 2023
@bensheldon bensheldon changed the title Always use MultiScheduler(instead of either MultiScheduler or single Scheduler); Delegate Scheduler Metrics to JobPerformer Always instantiate MultiScheduler; delegate Scheduler Metrics to JobPerformer Nov 10, 2023
@bensheldon bensheldon marked this pull request as ready for review November 10, 2023 19:54
@bensheldon bensheldon merged commit 077646a into main Nov 10, 2023
20 checks passed
@bensheldon bensheldon deleted the refactor_counts branch November 10, 2023 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code changes that do not introduce new features
Projects
Development

Successfully merging this pull request may close these issues.

1 participant