diff --git a/rowers/management/commands/processemail.py b/rowers/management/commands/processemail.py index f12a89ff..2ecc8ef5 100644 --- a/rowers/management/commands/processemail.py +++ b/rowers/management/commands/processemail.py @@ -111,8 +111,6 @@ 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) _ = nkstuff.get_nk_workouts(r) except: # pragma: no cover exc_type, exc_value, exc_traceback = sys.exc_info() diff --git a/rowers/nkstuff.py b/rowers/nkstuff.py index e3e2b8b3..ba35b2ce 100644 --- a/rowers/nkstuff.py +++ b/rowers/nkstuff.py @@ -123,8 +123,11 @@ def get_nk_workouts(rower, do_async=True, before=0, after=0): knownnkids = uniqify(knownnkids+tombstones+parkedids) newids = [nkid for nkid in nkids if nkid not in knownnkids] - s = 'New NK IDs {newids}'.format(newids=newids) - dologging('nklog.log', s) + if newids: + s = 'Starting NK Auto Import for user {id}'.format(id=r.user.id) + dologging('nklog.log', s) + s = 'New NK IDs {newids} (user {id})'.format(newids=newids,id=rower.user.id) + dologging('nklog.log', s) newparkedids = uniqify(newids+parkedids)