diff --git a/SAS/ResourceAssignment/RAtoOTDBTaskSpecificationPropagator/lib/rotspservice.py b/SAS/ResourceAssignment/RAtoOTDBTaskSpecificationPropagator/lib/rotspservice.py index 3f3c06fc681c371c6960aaf189c9cc8cb4cd3e00..d67c9b37e8de4689d1218586f2b66c1f6f89b414 100755 --- a/SAS/ResourceAssignment/RAtoOTDBTaskSpecificationPropagator/lib/rotspservice.py +++ b/SAS/ResourceAssignment/RAtoOTDBTaskSpecificationPropagator/lib/rotspservice.py @@ -74,6 +74,14 @@ class RATaskStatusChangedListener(RADBBusListener): elif new_task['status'] == 'conflict': self.onTaskConflict(new_task['id'], new_task['otdb_id'], new_task['mom_id']) + def onTaskInserted(self, new_task): + # override super onTaskInserted + # check for status, and call either onTaskScheduled or onTaskScheduled + if new_task['status'] == 'scheduled': + self.onTaskScheduled(new_task['id'], new_task['otdb_id'], new_task['mom_id']) + elif new_task['status'] == 'conflict': + self.onTaskConflict(new_task['id'], new_task['otdb_id'], new_task['mom_id']) + def onTaskScheduled(self, ra_id, otdb_id, mom_id): logger.info('onTaskScheduled: ra_id=%s otdb_id=%s mom_id=%s' % (ra_id, otdb_id, mom_id))