(self, response)
return RepeatRecordAttempt(
            cancelled=False,
            datetime=now,
            failure_reason=None,
            success_response=self._format_response(response),
            next_check=None,
            succeeded=True,
            info=self.get_attempt_info(),
        )
Log success in Datadog and return a success RepeatRecordAttempt.

        ``response`` can be a Requests response instance, or True if the
        payload did not result in an API call.
Log success in Datadog and return a success RepeatRecordAttempt.
Log success in Datadog and return a success RepeatRecordAttempt .
def handle_success(self, response):
        """
        Log success in Datadog and return a success RepeatRecordAttempt.

        ``response`` can be a Requests response instance, or True if the
        payload did not result in an API call.
        """
        now = datetime.utcnow()
        if is_response(response):
            # ^^^ Don't bother logging success in Datadog if the payload
            # did not need to be sent. (This can happen with DHIS2 if
            # the form that triggered the forwarder doesn't contain data
            # for a DHIS2 Event.)
            log_repeater_success_in_datadog(
                self.domain,
                response.status_code,
                self.repeater_type
            )
        return RepeatRecordAttempt(
            cancelled=False,
            datetime=now,
            failure_reason=None,
            success_response=self._format_response(response),
            next_check=None,
            succeeded=True,
            info=self.get_attempt_info(),
        )
def handle_success ( self , response ) : now = datetime . utcnow ( ) if is_response ( response ) : # ^^^ Don't bother logging success in Datadog if the payload # did not need to be sent. (This can happen with DHIS2 if # the form that triggered the forwarder doesn't contain data # for a DHIS2 Event.) log_repeater_success_in_datadog ( self . domain , response . status_code , self . repeater_type ) return RepeatRecordAttempt ( cancelled = False , datetime = now , failure_reason = None , success_response = self . _format_response ( response ) , next_check = None , succeeded = True , info = self . get_attempt_info ( ) , )