diff --git a/rowers/management/commands/processemail.py b/rowers/management/commands/processemail.py index e73a58ab..db741824 100644 --- a/rowers/management/commands/processemail.py +++ b/rowers/management/commands/processemail.py @@ -39,7 +39,7 @@ from rowers.opaque import encoder from rowers.models import User,VirtualRace,Workout from rowers.plannedsessions import email_submit_race from rowers.rower_rules import user_is_not_basic - +from rowers.utils import dologging # If you find a solution that does not need the two paths, please comment! sys.path.append('$path_to_root_of_project$') @@ -209,6 +209,8 @@ class Command(BaseCommand): rowers = Rower.objects.filter(nk_auto_import=True) for r in rowers: # pragma: no cover if user_is_not_basic(r.user): + s = 'Starting NK Auto Import for user {id}'.format(id=r.user.id) + dologging('nklog.log',s) res = nkstuff.get_nk_workouts(r) messages = Message.objects.filter(mailbox_id = workoutmailbox.id) diff --git a/rowers/nkstuff.py b/rowers/nkstuff.py index d6df4874..27f5eebb 100644 --- a/rowers/nkstuff.py +++ b/rowers/nkstuff.py @@ -148,6 +148,8 @@ def get_nk_workouts(rower, do_async=True,before=0,after=0): knownnkids = uniqify(knownnkids+tombstones+parkedids) newids = [nkid for nkid in nkids if not nkid in knownnkids] + s = 'New NK IDs {newids}'.format(newids=newids) + dologging('nklog.log',s) newparkedids = uniqify(newids+parkedids)