make actor pending include all obj with retry_at in the past

This commit is contained in:
Nick Sweeting 2024-11-17 20:09:38 -08:00
parent 8f8fbbb7a2
commit fb82fdae16
No known key found for this signature in database

View file

@ -315,7 +315,7 @@ class ActorType(Generic[ModelType]):
@classproperty
def pending_q(cls) -> Q:
"""Get the filter for objects that are ready for processing."""
return ~(cls.active_q) & ~(cls.final_q) & ~(cls.future_q)
return (~(cls.active_q) & ~(cls.final_q)) | Q(retry_at__lte=timezone.now())
@classmethod
def get_queue(cls, sort: bool=True) -> QuerySet[ModelType]: