Private
Public Access
1
0

removes temporary records in powertimefitnessmetric

This commit is contained in:
Sander Roosendaal
2018-01-19 08:34:58 +01:00
parent eea9efce2b
commit 8e6460eb06
3 changed files with 12 additions and 5 deletions

View File

@@ -32,7 +32,9 @@ def do_update(user,mode='rower',days=42):
else:
max_workout_id = max([m.last_workout for m in ms])
last_update_date = max([m.date.strftime('%Y-%m-%d') for m in ms])
if mode == 'rower':
workouts = Workout.objects.filter(
user=r,
@@ -50,6 +52,7 @@ def do_update(user,mode='rower',days=42):
except ValueError:
max_id = 0
if last_update_date < now_date and max_workout_id < max_id:
job = myqueue(queue,
handle_updatefitnessmetric,