(self)
return (self.get_queryset()
                .filter(not_paused)
                .filter(next_attempt_not_in_the_future)
                .filter(repeat_records_ready_to_send))
Return all SQLRepeaters ready to be forwarded.
Return all SQLRepeaters ready to be forwarded.
Return all SQLRepeaters ready to be forwarded .
def all_ready(self):
        """
        Return all SQLRepeaters ready to be forwarded.
        """
        not_paused = models.Q(is_paused=False)
        next_attempt_not_in_the_future = (
            models.Q(next_attempt_at__isnull=True)
            | models.Q(next_attempt_at__lte=timezone.now())
        )
        repeat_records_ready_to_send = models.Q(
            repeat_records__state__in=(RECORD_PENDING_STATE,
                                       RECORD_FAILURE_STATE)
        )
        return (self.get_queryset()
                .filter(not_paused)
                .filter(next_attempt_not_in_the_future)
                .filter(repeat_records_ready_to_send))
def all_ready ( self ) : not_paused = models . Q ( is_paused = False ) next_attempt_not_in_the_future = ( models . Q ( next_attempt_at__isnull = True ) | models . Q ( next_attempt_at__lte = timezone . now ( ) ) ) repeat_records_ready_to_send = models . Q ( repeat_records__state__in = ( RECORD_PENDING_STATE , RECORD_FAILURE_STATE ) ) return ( self . get_queryset ( ) . filter ( not_paused ) . filter ( next_attempt_not_in_the_future ) . filter ( repeat_records_ready_to_send ) )