From e8dbab5a7b3583e1e2e1f2f4c616ed12992c6a30 Mon Sep 17 00:00:00 2001 From: kevgliss Date: Wed, 1 Nov 2023 11:08:33 -0700 Subject: [PATCH] Rollback session in case or exceptions (#3917) --- src/dispatch/plugins/dispatch_aws/plugin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dispatch/plugins/dispatch_aws/plugin.py b/src/dispatch/plugins/dispatch_aws/plugin.py index 518d301ffea6..84294f030529 100644 --- a/src/dispatch/plugins/dispatch_aws/plugin.py +++ b/src/dispatch/plugins/dispatch_aws/plugin.py @@ -75,4 +75,5 @@ def consume(self, db_session, project): if entries: client.delete_message_batch(QueueUrl=queue_url, Entries=entries) except Exception as e: + db_session.rollback() log.exception(e)