in backend/bms_app/services/status_handlers/operation.py [0:0]
def terminate(self):
# check if operation status has been processed in the expected way
# if operation if not in one of expected status
# it means that something went wrong
# and it make sense to mark operation as failed
if self.operation.status not in FINISHED_OPERATION_STATUSES:
self._fail_all_operation_details()
self.finish()