Skip to content

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

Merged
bennybp merged 4 commits intomainfrom
manager_idle
Jan 9, 2025
Merged

Option to shut down managers if idle for too long#877
bennybp merged 4 commits intomainfrom
manager_idle

Conversation

@bennybp
Copy link
Copy Markdown
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
@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