From 0e6310f2b0fe2972e25b4aa2669b195963a34ab2 Mon Sep 17 00:00:00 2001 From: Volodymyr Tartynskyi Date: Thu, 30 Apr 2015 16:15:01 +0300 Subject: [PATCH] Update views.py Fixed celery call --- dbmail/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbmail/views.py b/dbmail/views.py index 68f91f5..f711430 100644 --- a/dbmail/views.py +++ b/dbmail/views.py @@ -58,7 +58,8 @@ def mail_read_tracker(request, encrypted): req = {k: v for k, v in request.META.items() if k.startswith('HTTP_') or k.startswith('REMOTE')} if defaults.ENABLE_CELERY is True: - mail_track.delay(args=[req, encrypted], retry=1, max_retries=2) + mail_track.apply_async(args=[req, encrypted], + retry=1, retry_policy={'max_retries': 3}) else: mail_track(req, encrypted)