Private
Public Access
1
0

reverting one commit,

This commit is contained in:
Sander Roosendaal
2023-06-08 22:44:06 +02:00
parent 196d0843ab
commit bf5cee9676
3 changed files with 27 additions and 21 deletions

View File

@@ -1621,27 +1621,31 @@ def get_existing_job(w):
def workout_trimp(w, reset=False):
r = w.user
if w.trimp is None:
if get_existing_job(w):
return 0, 0
elif w.averagehr is None:
if get_existing_job(w):
return w.trimp, 0
elif w.trimp <= 0 and w.averagehr > 0:
ftp = float(r.ftp)
_ = myqueue(
queuehigh,
handle_calctrimp,
w.id,
w.csvfilename,
ftp,
r.sex,
r.hrftp,
r.max,
r.rest)
return w.trimp, w.hrtss
elif w.trimp > -1 and not reset:
return w.trimp, w.hrtss
# below is temporary
if w.trimp > -1 and not reset:
return w.trimp, w.hrtss
# if w.trimp is None:
# if get_existing_job(w):
# return 0, 0
# elif w.averagehr is None:
# if get_existing_job(w):
# return w.trimp, 0
# elif w.trimp <= 0 and w.averagehr > 0:
# ftp = float(r.ftp)
# _ = myqueue(
# queuehigh,
# handle_calctrimp,
# w.id,
# w.csvfilename,
# ftp,
# r.sex,
# r.hrftp,
# r.max,
# r.rest)
# return w.trimp, w.hrtss
# elif w.trimp > -1 and not reset:
# return w.trimp, w.hrtss
if get_existing_job(w):
return 0, 0

Binary file not shown.

View File

@@ -365,6 +365,8 @@ def myqueue(queue, function, *args, **kwargs):
kwargs['jobkey'] = job_id
kwargs['timeout'] = 3600
dologging('queue.log',function.__name__)
job = queue.enqueue(function, *args, **kwargs)
return job # pragma: no cover