catch the new ProcessUpdatesAlreadyRunning exception

This commit is contained in:
Laura Klünder 2017-12-23 15:51:26 +01:00
parent d554a98985
commit 0b3517de5b

View file

@ -1,7 +1,6 @@
import logging
from celery.exceptions import MaxRetriesExceededError
from django.db import DatabaseError
from django.utils.formats import date_format
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
@ -22,7 +21,7 @@ def process_map_updates(self):
try:
try:
updates = MapUpdate.process_updates()
except DatabaseError:
except MapUpdate.ProcessUpdatesAlreadyRunning:
if self.request.called_directly:
raise
logger.info('Processing is already running, retrying in 30 seconds.')