MissedMessageWorker: Remove unnecessary transaction.atomic.

We only have one query which will change database state in this function,
and we already have a lock on the process itself, so there's no need for
a transaction.

This was added in ebb4eab0f9.
This commit is contained in:
Abhijeet Prasad Bodas 2021-07-21 15:31:12 +05:30 committed by Tim Abbott
parent 60e3429da3
commit de78b015d9
1 changed files with 16 additions and 17 deletions

View File

@ -587,7 +587,6 @@ class MissedMessageWorker(QueueProcessingWorker):
user_profile_id: int = event["user_profile_id"]
batch_duration = datetime.timedelta(seconds=self.BATCH_DURATION)
with transaction.atomic():
try:
pending_email = ScheduledMessageNotificationEmail.objects.filter(
user_profile_id=user_profile_id