From b51719f170713cfdfbbb8b76ad755a344d805b4c Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Tue, 9 May 2017 15:31:09 +0200 Subject: [PATCH 1/2] added queues to mailprocessing.py --- rowers/mailprocessing.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rowers/mailprocessing.py b/rowers/mailprocessing.py index cdf7f38c..81c10dd3 100644 --- a/rowers/mailprocessing.py +++ b/rowers/mailprocessing.py @@ -24,6 +24,11 @@ import zipfile import os import rowers.dataprep as dataprep +import django_rq +queue = django_rq.get_queue('default') +queuelow = django_rq.get_queue('low') +queuehigh = django_rq.get_queue('default') + # Sends a confirmation with a link to the workout def send_confirm(u,name,link): fullemail = u.email From b5acdf8498ae845a482d1a5a82a3206792d6ae88 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Tue, 9 May 2017 15:48:06 +0200 Subject: [PATCH 2/2] mail processing --- rowers/mailprocessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rowers/mailprocessing.py b/rowers/mailprocessing.py index 81c10dd3..2e4c1208 100644 --- a/rowers/mailprocessing.py +++ b/rowers/mailprocessing.py @@ -189,7 +189,7 @@ def make_new_workout_from_email(rr,f2,name,cntr=0): res = queuehigh.enqueue(handle_sendemail_unrecognized, f2,"roosendaalsander@gmail.com") - return 0 + return 1 summary = '' # handle non-Painsled