Private
Public Access
1
0

logging for c2 import

This commit is contained in:
Sander Roosendaal
2021-01-14 19:58:02 +01:00
parent 9f19e9da05
commit 24380c97d0
2 changed files with 14 additions and 2 deletions

View File

@@ -204,8 +204,12 @@ class Command(BaseCommand):
# Concept2
rowers = Rower.objects.filter(c2_auto_import=True)
for r in rowers:
with open('c2_auto_import.log','a') as logfile:
logfile.write(str(timezone.now())+" "+str(r.user)+" \n")
if user_is_not_basic(r.user):
c2stuff.get_c2_workouts(r)
with open('c2_auto_import.log','a') as logfile:
logfile.write(' getting workouts \n')
c2stuff.get_c2_workouts(r)
messages = Message.objects.filter(mailbox_id = workoutmailbox.id)