if (task['starttime']<max_pred_endtime)or(min_start_timestampandtask['starttime']>min_start_timestamp):
if (task['starttime']<max_pred_endtime)or(min_start_timestampandtask['starttime']>min_start_timestamp):
shift=max_pred_endtime-task['starttime']
shift=max_pred_endtime-task['starttime']
logger.info("Moving %s pipeline radb_id=%s otdb_id=%s by %s",task['status'],task['id'],task['otdb_id'],shift)
logger.info("Moving %s pipeline radb_id=%s otdb_id=%s by %s from \'%s\' to \'%s\'",task['status'],task['id'],task['otdb_id'],shift,task['starttime'],max_pred_endtime)
logger.warn("Moving of pipeline radb_id=%s otdb_id=%s caused the status to change to %s",updated_task['id'],updated_task['otdb_id'],updated_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'])
#TODO: automatically resolve conflict status by moved pipeline in first free time slot.
#TODO: automatically resolve conflict status by moved pipeline in first free time slot.
exceptExceptionase:
exceptExceptionase:
logger.error("Error while checking pipeline starttime: %s",e)
logger.error("Error while checking pipeline starttime: %s",e)