Skip to content

Commit

Permalink
Update batch command
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Apr 30, 2024
1 parent 3fc65a9 commit 93758b4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ class Command(BaseCommand):

def handle(self, *args, **options):
# First send newly validated tenders
validated_tenders_to_send = Tender.objects.validated_but_not_sent()
validated_tenders_to_send = Tender.objects.validated_but_not_sent().is_not_outdated()
if validated_tenders_to_send.count():
self.stdout.write(f"Found {validated_tenders_to_send.count()} validated tender(s) to send")
for tender in validated_tenders_to_send:
send_validated_tender(tender)

# Then look at already sent tenders (batch mode)
validated_sent_tenders_batch_to_send = Tender.objects.validated_sent_batch()
validated_sent_tenders_batch_to_send = Tender.objects.validated_sent_batch().is_not_outdated()
if validated_sent_tenders_batch_to_send.count():
self.stdout.write(
f"Found {validated_sent_tenders_batch_to_send.count()} validated sent tender(s) to batch"
Expand Down

0 comments on commit 93758b4

Please sign in to comment.