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

Option to shut down managers if idle for too long #877

Merged
merged 4 commits into from
Jan 9, 2025
Merged

Conversation

bennybp
Copy link
Contributor

@bennybp bennybp commented Jan 8, 2025

Description

(builds on PR #876)

Sometimes, we would like managers to shut down if they are not running any jobs for too long. This is particularly true if managers themselves are submitted as jobs to a queuing system.

This PR adds the functionality to specify a maximum idle time in the manager config: max_idle_time. This time is approximate, as idleness is only checked at the time a manager fetches new tasks from the server.

If at update time the idle time is beyond the configured max, the manager will stop itself.

Because of PR #876, this can also be specified as a string: 60s or 30m, or with colons (30:00 being 30 minutes).

@j-wags

Status

  • Code base linted
  • Ready to go

@bennybp bennybp changed the title Shutdown managers if idle for too long Option to shut down managers if idle for too long Jan 8, 2025
@bennybp bennybp force-pushed the manager_idle branch 2 times, most recently from 4bbe0df to 6e56f23 Compare January 8, 2025 23:00
@bennybp bennybp merged commit 90883d3 into main Jan 9, 2025
15 checks passed
@bennybp bennybp deleted the manager_idle branch January 9, 2025 13:20
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.

1 participant