A couple other tweaks.

This commit is contained in:
Michael Woods
2025-12-28 12:04:08 -05:00
parent d3e66f45b2
commit 04d34fdf32
3 changed files with 8 additions and 1 deletions

View File

@@ -156,6 +156,7 @@ class Orchestrator:
self.runners = []
self.runner_lock = Lock()
self.listeners = []
self.started: bool = False
def get_finished_runners(self) -> list[Runner]:
return [r for r in self.runners if r.is_finished()]
@@ -195,8 +196,10 @@ class Orchestrator:
def start(self):
"""Do any setup and then be ready to operate"""
self.started = True
pass
def stop(self):
"""Do any cleanup needed."""
self.started = False
pass

View File

@@ -167,7 +167,6 @@ class PodmanRunner(Runner):
class PodmanOrchestrator(Orchestrator):
def __init__(self, uri: Optional[str] = None, options: Optional[PodmanOptions] = None):
super().__init__()
self.started = False
self.user_containers = {}
self.manager_thread = None
self._client = None

View File

@@ -233,6 +233,11 @@ class Server:
self.ping_job_queue()
if (self.orchestrator is not None) and self.orchestrator.started and self.check_job_queue:
with self.db.transaction() as storage:
if 'job_check_interval' in storage.root.config:
try:
self.job_check_interval = int(storage.root.config['job_check_interval'])
except:
logging.warning(f"Invalid config value for 'job_check_interval'")
# queue as many jobs as possible
while self.orchestrator.runners_available():
if len(storage.root.job_queue) > 0: