Skip to content
Snippets Groups Projects
Commit 0149ff52 authored by Auke Klazema's avatar Auke Klazema
Browse files

SW-705: Change parameter name from busname to exchange

parent 5eef415b
No related branches found
No related tags found
No related merge requests found
......@@ -73,13 +73,13 @@ def movePipelineAfterItsPredecessors(task, radbrpc, min_start_timestamp=None):
if shift != timedelta(seconds=0):
logger.info("Moving %s pipeline radb_id=%s otdb_id=%s by %s from \'%s\' to \'%s\'", task['status'], task['id'], task['otdb_id'], format_timedelta(shift), task['starttime'], newStartTime)
if not radbrpc.updateTaskAndResourceClaims(task['id'], starttime=newStartTime, endtime=newEndTime):
logger.warn("Could not update start/endtime for pipeline radb_id=%s otdb_id=%s",
logger.warning("Could not update start/endtime for pipeline radb_id=%s otdb_id=%s",
updated_task['id'], updated_task['otdb_id'])
updated_task = radbrpc.getTask(task['id'])
if updated_task['status'] != task['status']:
logger.warn("Moving of pipeline radb_id=%s otdb_id=%s caused the status to change from %s to %s", updated_task['id'], updated_task['otdb_id'], task['status'], updated_task['status'])
logger.warning("Moving of pipeline radb_id=%s otdb_id=%s caused the status to change from %s to %s", updated_task['id'], updated_task['otdb_id'], task['status'], updated_task['status'])
#TODO: automatically resolve conflict status by moved pipeline in first free time slot.
except Exception as e:
logger.error("Error while checking pipeline starttime: %s", e)
......@@ -87,16 +87,16 @@ def movePipelineAfterItsPredecessors(task, radbrpc, min_start_timestamp=None):
class ScheduleChecker():
def __init__(self,
busname=DEFAULT_BUSNAME,
exchange=DEFAULT_BUSNAME,
broker=DEFAULT_BROKER):
"""
"""
self._thread = None
self._running = False
self._radbrpc = RADBRPC.create(exchange=busname, broker=broker)
self._momrpc = MoMQueryRPC.create(exchange=busname, broker=broker)
self._curpc = CleanupRPC.create(exchange=busname, broker=broker)
self._otdbrpc = OTDBRPC.create(exchange=busname, broker=broker, timeout=180)
self._radbrpc = RADBRPC.create(exchange=exchange, broker=broker)
self._momrpc = MoMQueryRPC.create(exchange=exchange, broker=broker)
self._curpc = CleanupRPC.create(exchange=exchange, broker=broker)
self._otdbrpc = OTDBRPC.create(exchange=exchange, broker=broker, timeout=180)
def __enter__(self):
"""Internal use only. (handles scope 'with')"""
......@@ -127,7 +127,6 @@ class ScheduleChecker():
self._running = False
self._thread.join(60)
def checkRunningPipelines(self):
""" Update the end time of pipelines if they are running
beyond their scheduled end time. """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment