Minor fixes.
This commit is contained in:
@@ -88,4 +88,6 @@ class Client:
|
|||||||
logging.debug("Connection attempt timed out.")
|
logging.debug("Connection attempt timed out.")
|
||||||
conn.close()
|
conn.close()
|
||||||
return None
|
return None
|
||||||
return self.send_and_receive(req, conn, timeout=int(remaining_time))
|
response = self.send_and_receive(req, conn, timeout=int(remaining_time))
|
||||||
|
conn.close()
|
||||||
|
return response
|
||||||
|
|||||||
@@ -91,11 +91,13 @@ class Server:
|
|||||||
if 'user_jobs' not in conn.root():
|
if 'user_jobs' not in conn.root():
|
||||||
conn.root.user_jobs = PersistentMapping()
|
conn.root.user_jobs = PersistentMapping()
|
||||||
init_bulletins(conn.root())
|
init_bulletins(conn.root())
|
||||||
|
if ('jobs_enabled' in conn.root.config) and conn.root.config['jobs_enabled']:
|
||||||
if 'jobs_enabled' in conn.root.config:
|
logging.debug(conn.root.config['jobs_enabled'])
|
||||||
|
logging.debug(conn.root.config['jobs_config'])
|
||||||
if 'runner' in conn.root.config['jobs_config']:
|
if 'runner' in conn.root.config['jobs_config']:
|
||||||
val = str(conn.root.config['jobs_config']['runner']).lower().strip()
|
val = str(conn.root.config['jobs_config']['runner']).lower().strip()
|
||||||
if val in ['podman']:
|
if val in ['podman']:
|
||||||
|
logging.debug("Enabling podman orchestrator")
|
||||||
self.orchestrator = get_orchestrator_from_config(conn.root.config['jobs_config'])
|
self.orchestrator = get_orchestrator_from_config(conn.root.config['jobs_config'])
|
||||||
|
|
||||||
self.app = pe.app.Application()
|
self.app = pe.app.Application()
|
||||||
@@ -198,7 +200,7 @@ class Server:
|
|||||||
return
|
return
|
||||||
# Add things to do here:
|
# Add things to do here:
|
||||||
|
|
||||||
if self.orchestrator.started:
|
if (self.orchestrator is not None) and self.orchestrator.started:
|
||||||
with self.db.transaction() as storage:
|
with self.db.transaction() as storage:
|
||||||
# queue as many jobs as possible
|
# queue as many jobs as possible
|
||||||
while self.orchestrator.runners_available():
|
while self.orchestrator.runners_available():
|
||||||
@@ -219,7 +221,6 @@ class Server:
|
|||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
if self.orchestrator.started:
|
|
||||||
finished_runners = []
|
finished_runners = []
|
||||||
for runner in self.orchestrator.runners:
|
for runner in self.orchestrator.runners:
|
||||||
if runner.is_finished():
|
if runner.is_finished():
|
||||||
|
|||||||
Reference in New Issue
Block a user