avoid useless stacktraces in celery log
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 _
@@ -18,6 +19,7 @@ def process_map_updates(self):
logger.info('Processing map updates...')
from c3nav.mapdata.models import MapUpdate
+ try:
try:
updates = MapUpdate.process_updates()
except DatabaseError:
@@ -25,6 +27,9 @@ def process_map_updates(self):
raise
logger.info('Processing is already running, retrying in 30 seconds.')
raise self.retry(countdown=30)
+ except MaxRetriesExceededError:
+ logger.info('Cannot retry, retries exceeded. Exiting.')
+ return
if updates:
print()
