Skip to content

Commit

Permalink
Merge pull request #23 from PSNAppz/1.0.0
Browse files Browse the repository at this point in the history
Invoke account_statement_generator task after the payments are processed
  • Loading branch information
venky-ganapathy authored Sep 18, 2024
2 parents dbd2d48 + 8eda9f0 commit 72a7042
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ def process_payments_worker(payment_request_batch_id: str):
)
session.add(account_statement)
session.commit()
_logger.info("Account statement generation task created")
celery_app.send_task(
"account_statement_generator",
args=(account_statement.id,),
)
except Exception as e:
_logger.error(f"Error processing payment: {e}")
session.rollback()
Expand Down

0 comments on commit 72a7042

Please sign in to comment.