mirror of https://github.com/zulip/zulip.git
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:
parent
60e3429da3
commit
de78b015d9
|
@ -587,7 +587,6 @@ class MissedMessageWorker(QueueProcessingWorker):
|
||||||
user_profile_id: int = event["user_profile_id"]
|
user_profile_id: int = event["user_profile_id"]
|
||||||
batch_duration = datetime.timedelta(seconds=self.BATCH_DURATION)
|
batch_duration = datetime.timedelta(seconds=self.BATCH_DURATION)
|
||||||
|
|
||||||
with transaction.atomic():
|
|
||||||
try:
|
try:
|
||||||
pending_email = ScheduledMessageNotificationEmail.objects.filter(
|
pending_email = ScheduledMessageNotificationEmail.objects.filter(
|
||||||
user_profile_id=user_profile_id
|
user_profile_id=user_profile_id
|
||||||
|
|
Loading…
Reference in New Issue