(repeater, domain, payload)
return repeat_record
Only useful in a very specific edge case for CreateCaseRepeater
    If a CreateCaseRepeater has a missing repeat record, but the case now contains update transactions
    This can be used to properly trigger the missing repeat record.
Only useful in a very specific edge case for CreateCaseRepeater
    If a CreateCaseRepeater has a missing repeat record, but the case now contains update transactions
    This can be used to properly trigger the missing repeat record.
Only useful in a very specific edge case for CreateCaseRepeater If a CreateCaseRepeater has a missing repeat record but the case now contains update transactions This can be used to properly trigger the missing repeat record .
def create_case_repeater_register(repeater, domain, payload):
    """
    Only useful in a very specific edge case for CreateCaseRepeater
    If a CreateCaseRepeater has a missing repeat record, but the case now contains update transactions
    This can be used to properly trigger the missing repeat record.
    """
    if not isinstance(repeater, CreateCaseRepeater):
        logger.error(f"Error - cannot call create_case_repeater_register on repeater type f{type(repeater)}")
        return

    if not create_case_repeater_allowed_to_forward(repeater, payload):
        return

    now = datetime.utcnow()
    repeat_record = RepeatRecord(
        repeater_id=repeater.get_id,
        repeater_type=repeater.doc_type,
        domain=domain,
        registered_on=now,
        next_check=now,
        payload_id=payload.get_id
    )
    metrics_counter('commcare.repeaters.new_record', tags={
        'domain': domain,
        'doc_type': repeater.doc_type
    })
    repeat_record.save()
    repeat_record.attempt_forward_now()
    return repeat_record
def create_case_repeater_register ( repeater , domain , payload ) : if not isinstance ( repeater , CreateCaseRepeater ) : logger . error ( f"Error - cannot call create_case_repeater_register on repeater type f{type(repeater)}" ) return if not create_case_repeater_allowed_to_forward ( repeater , payload ) : return now = datetime . utcnow ( ) repeat_record = RepeatRecord ( repeater_id = repeater . get_id , repeater_type = repeater . doc_type , domain = domain , registered_on = now , next_check = now , payload_id = payload . get_id ) metrics_counter ( 'commcare.repeaters.new_record' , tags = { 'domain' : domain , 'doc_type' : repeater . doc_type } ) repeat_record . save ( ) repeat_record . attempt_forward_now ( ) return repeat_record