(self, domain, case_id, detail)
Rebuild a case with retries
    - retry in 5 min if failure occurs after (default_retry_delay)
    - retry a total of 3 times
Rebuild a case with retries
    - retry in 5 min if failure occurs after (default_retry_delay)
    - retry a total of 3 times
Rebuild a case with retries - retry in 5 min if failure occurs after ( default_retry_delay ) - retry a total of 3 times
def _rebuild_case_with_retries(self, domain, case_id, detail):
    """
    Rebuild a case with retries
    - retry in 5 min if failure occurs after (default_retry_delay)
    - retry a total of 3 times
    """
    from casexml.apps.case.cleanup import rebuild_case_from_forms
    try:
        rebuild_case_from_forms(domain, case_id, detail)
    except (UnexpectedDeletedXForm, ResourceConflict) as exc:
        try:
            self.retry(exc=exc)
        except MaxRetriesExceededError:
            notify_exception(
                "Maximum Retries Exceeded while rebuilding case {} during deletion.".format(case_id)
            )
def _rebuild_case_with_retries ( self , domain , case_id , detail ) : from casexml . apps . case . cleanup import rebuild_case_from_forms try : rebuild_case_from_forms ( domain , case_id , detail ) except ( UnexpectedDeletedXForm , ResourceConflict ) as exc : try : self . retry ( exc = exc ) except MaxRetriesExceededError : notify_exception ( "Maximum Retries Exceeded while rebuilding case {} during deletion." . format ( case_id ) )