Skip to content

Commit

Permalink
fix: retry command counters
Browse files Browse the repository at this point in the history
  • Loading branch information
igobranco committed Mar 12, 2024
1 parent b6239e2 commit 6040c05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/billing/management/commands/retry_sage_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def handle(self, *args, **options) -> str | None:
try:
for sagex3_failed_transaction in sagex3_failed_transactions:
TransactionService(sagex3_failed_transaction.transaction).run_steps_to_send_transaction()
counters["success"] = +1
counters["success"] += 1
except Exception as e:
self.stdout.write(f"Error while retrying: {e}")
counters["failed"] = +1
counters["failed"] += 1
finish = time.time() - start
self.stdout.write(f"\n----- {sagex3_failed_transactions_amount} Transactions were retried -----\n")
self.stdout.write(f"\nSUCCESSFULL RETRIES: {counters['success']} FAILED RETRIES: {counters['failed']}\n")
Expand Down

0 comments on commit 6040c05

Please sign in to comment.