Skip to content
Snippets Groups Projects
Commit fb3076d4 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-657: ignoring mom-opened tasks for now

parent 52d9043f
No related branches found
No related tags found
No related merge requests found
...@@ -212,26 +212,26 @@ class ScheduleChecker(): ...@@ -212,26 +212,26 @@ class ScheduleChecker():
mom_status = mom_details[mom_id].get('object_status') if mom_id in mom_details else None mom_status = mom_details[mom_id].get('object_status') if mom_id in mom_details else None
if (mom_id not in mom_details or if (mom_id not in mom_details or
mom_status in ['opened', 'described', 'suspended']): mom_status in ['opened', 'described', 'suspended']):
logger.info('task %s mom_id=%s otdb_id=%s has radb_status=%s and mom_status=%s => removing task from radb', logger.warning('task %s mom_id=%s otdb_id=%s has radb_status=%s and mom_status=%s => Would normally remove task from radb, ignoring for now',
task['id'], task['id'],
task['mom_id'], task['mom_id'],
task['otdb_id'], task['otdb_id'],
task['status'], task['status'],
mom_status) mom_status)
if mom_status in ['opened', 'described']: #if mom_status in ['opened', 'described']:
# auto delete data for tasks which went back to opened in mom (for pipeline restarts for example) ## auto delete data for tasks which went back to opened in mom (for pipeline restarts for example)
# The reason to delete it here is because otherwise the cleanupservice tries to get it's info from an already deleted task in radb/otdb ## The reason to delete it here is because otherwise the cleanupservice tries to get it's info from an already deleted task in radb/otdb
path_result = self._curpc.getPathForOTDBId(task['otdb_id']) #path_result = self._curpc.getPathForOTDBId(task['otdb_id'])
if path_result['found']: #if path_result['found']:
logger.info("removing data on disk from previous run for otdb_id %s", task['otdb_id']) #logger.info("removing data on disk from previous run for otdb_id %s", task['otdb_id'])
result = self._curpc.removeTaskData(task['otdb_id']) #result = self._curpc.removeTaskData(task['otdb_id'])
if not result['deleted']: #if not result['deleted']:
logger.warning("could not remove all data on disk from previous run for otdb_id %s: %s", task['otdb_id'], result['message']) #logger.warning("could not remove all data on disk from previous run for otdb_id %s: %s", task['otdb_id'], result['message'])
# delete the spec (and task/claims etc via cascading delete) from radb to get it in sync again with mom ## delete the spec (and task/claims etc via cascading delete) from radb to get it in sync again with mom
self._radbrpc.deleteSpecification(task['specification_id']) #self._radbrpc.deleteSpecification(task['specification_id'])
except Exception as e: except Exception as e:
logger.error("Error while checking unrun task mom_id=%s otdb_id=%s radb_id=%s for MoM opened/described/suspended status: %s", logger.error("Error while checking unrun task mom_id=%s otdb_id=%s radb_id=%s for MoM opened/described/suspended status: %s",
task['mom_id'], task['mom_id'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment