You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Service.send_exception is possibly called in both answer_pub_sub_question and Service.answer if an error is raised during question is being answered. We should find out whether exception messages are in fact being sent to the parent twice.
What is the expected behavior?
Exception messages should be sent once only.
Proposed Solution
Possibly eliminate one of the calls of the method.
The text was updated successfully, but these errors were encountered:
We previously had this code in a django-twined private app that would be triggered if a result message was received but the child then raised an exception:
# TODO: REFACTOR REQUEST Refactor this signal handler once exceptions from the octue service
# are correctly handled.
# Exceptions are sent from a service after the analysis has been finalised resulting in the service
# having an answer but marked failed. Don't update question status as failed if it has an answer.
@receiver(exception_received, sender=ServiceUsageEvent)
def update_question_status(sender, service_usage_event, **kwargs):
logger.info("Exception received for question %s", service_usage_event.question_id)
question = service_usage_event.question.as_subclass()
# check to prevent completed questions with answer being set to failed
# due to an exception being sent after the answers have been finalised.
if not question.output_values:
question.calculation_status = ERROR_STATUS
question.save()
Bug report
What is the current behavior?
Service.send_exception
is possibly called in bothanswer_pub_sub_question
andService.answer
if an error is raised during question is being answered. We should find out whether exception messages are in fact being sent to the parent twice.What is the expected behavior?
Exception messages should be sent once only.
Proposed Solution
Possibly eliminate one of the calls of the method.
The text was updated successfully, but these errors were encountered: