mirror of
https://github.com/pretix/pretix.git
synced 2026-05-15 16:54:00 +00:00
Apply suggestions from code review
Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
@@ -245,6 +245,9 @@ class OutboundSyncProvider:
|
||||
sq.in_flight_since = now()
|
||||
sq.save()
|
||||
except DatabaseError:
|
||||
# Either select_for_update failed to lock the row, or we couldn't set in_flight
|
||||
# as this order is already in flight (UNIQUE violation). In either case, we ignore
|
||||
# this order for now.
|
||||
continue
|
||||
try:
|
||||
mapped_objects = self.sync_order(sq.order)
|
||||
|
||||
@@ -51,7 +51,7 @@ class OrderSyncQueue(models.Model):
|
||||
not_before = models.DateTimeField(blank=False, null=False, db_index=True)
|
||||
need_manual_retry = models.CharField(blank=True, null=True, max_length=20, choices=[
|
||||
('exceeded', _('Temporary error, auto-retry limit exceeded')),
|
||||
('permanent', _('Misconfiguration, please check provider settings')),
|
||||
('permanent', _('Provider reported a permanent error')),
|
||||
('config', _('Misconfiguration, please check provider settings')),
|
||||
('internal', _('System error, needs manual intervention')),
|
||||
('timeout', _('System error, needs manual intervention')),
|
||||
|
||||
Reference in New Issue
Block a user