fix
This commit is contained in:
@@ -550,7 +550,7 @@ class IntervalsIntegration(SyncIntegration):
|
||||
workouttype=workouttype,
|
||||
duration=duration,
|
||||
distance=distance,
|
||||
intervalsid=id,
|
||||
uploadedtointervals=id,
|
||||
)
|
||||
|
||||
uploadoptions = {
|
||||
|
||||
164
rowers/tasks.py
164
rowers/tasks.py
@@ -65,9 +65,6 @@ from rowingdata.otherparsers import FitSummaryData
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
from rowers.celery import app
|
||||
from celery import shared_task
|
||||
|
||||
import datetime
|
||||
import pytz
|
||||
import iso8601
|
||||
@@ -127,6 +124,7 @@ from polars.exceptions import (
|
||||
from django_rq import job
|
||||
from django.utils import timezone
|
||||
from django.utils.html import strip_tags
|
||||
from rq.decorators import job
|
||||
|
||||
from rowers.utils import deserialize_list, ewmovingaverage, wavg, dologging
|
||||
import rowers.utils as utils
|
||||
@@ -200,7 +198,7 @@ def correct_intensity(workout):
|
||||
return workout
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_loadnextweek(rower, debug=False, **kwargs):
|
||||
|
||||
plan = rower.training_plan_code
|
||||
@@ -277,7 +275,7 @@ def handle_loadnextweek(rower, debug=False, **kwargs):
|
||||
return 0
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def create_sessions_from_json_async(plansteps, rower, startdate, manager, planbyrscore, plan, plan_past_days, debug=False, **kwargs):
|
||||
trainingdays = plansteps['trainingDays']
|
||||
planstartdate = startdate
|
||||
@@ -332,14 +330,14 @@ def create_sessions_from_json_async(plansteps, rower, startdate, manager, planby
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_remove_workouts_team(ws, t, debug=False, **kwargs): # pragma: no cover
|
||||
for w in ws:
|
||||
w.team.remove(t)
|
||||
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_add_workouts_team(ws, t, debug=False, **kwargs): # pragma: no cover
|
||||
|
||||
for w in ws:
|
||||
@@ -391,7 +389,7 @@ def uploadactivity(access_token, filename, description='',
|
||||
|
||||
return 0, 0, 0, 0 # pragma: no cover
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def send_session_stats(user, debug=False, **kwargs):
|
||||
ws = Workout.objects.filter(plannedsession__isnull=False)
|
||||
|
||||
@@ -438,7 +436,7 @@ def send_session_stats(user, debug=False, **kwargs):
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def check_tp_workout_id(workout, location, attempts=5, debug=False, **kwargs): # pragma: no cover
|
||||
authorizationstring = str('Bearer ' + workout.user.tptoken)
|
||||
headers = {'Authorization': authorizationstring,
|
||||
@@ -465,7 +463,7 @@ def check_tp_workout_id(workout, location, attempts=5, debug=False, **kwargs): #
|
||||
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_workout_tp_upload(w, thetoken, tcxfilename, workouttype, debug=False, **kwargs): # pragma: no cover
|
||||
tpid = 0
|
||||
r = w.user
|
||||
@@ -503,7 +501,7 @@ def handle_workout_tp_upload(w, thetoken, tcxfilename, workouttype, debug=False,
|
||||
|
||||
return tpid
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def instroke_static(w, metric, debug=False, **kwargs): # pragma: no cover
|
||||
f1 = w.csvfilename[6:-4]
|
||||
rowdata = rdata(csvfile=w.csvfilename)
|
||||
@@ -540,7 +538,7 @@ def instroke_static(w, metric, debug=False, **kwargs): # pragma: no cover
|
||||
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_request_post(url, data, debug=False, **kwargs): # pragma: no cover
|
||||
if 'localhost' in url:
|
||||
url = 'http'+url[4:]
|
||||
@@ -550,12 +548,12 @@ def handle_request_post(url, data, debug=False, **kwargs): # pragma: no cover
|
||||
return response.status_code
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def add(x, y): # pragma: no cover
|
||||
return x + y
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_c2_sync(workoutid, url, headers, data, debug=False, **kwargs):
|
||||
response = requests.post(url, headers=headers, data=data)
|
||||
if response.status_code not in [200, 201]: # pragma: no cover
|
||||
@@ -595,7 +593,7 @@ def handle_c2_sync(workoutid, url, headers, data, debug=False, **kwargs):
|
||||
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sporttracks_sync(workoutid, url, headers, data, debug=False, **kwargs):
|
||||
response = requests.post(url, headers=headers, data=data)
|
||||
if response.status_code not in [200, 201]: # pragma: no cover
|
||||
@@ -616,7 +614,7 @@ def handle_sporttracks_sync(workoutid, url, headers, data, debug=False, **kwargs
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_strava_sync(stravatoken,
|
||||
workoutid, filename, name, activity_type, description, debug=False, **kwargs):
|
||||
client = stravalib.Client(access_token=stravatoken)
|
||||
@@ -732,7 +730,7 @@ def handle_strava_sync(stravatoken,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_c2_import_stroke_data(c2token,
|
||||
c2id, workoutid,
|
||||
starttimeunix,
|
||||
@@ -832,9 +830,8 @@ def getagegrouprecord(age, sex='male', weightcategory='hwt',
|
||||
from rowers.models import polygon_to_path
|
||||
|
||||
|
||||
@app.task(bind=True)
|
||||
def handle_check_race_course(self,
|
||||
f1, workoutid, courseid,
|
||||
@job('default')
|
||||
def handle_check_race_course(f1, workoutid, courseid,
|
||||
recordid, useremail, userfirstname,
|
||||
**kwargs):
|
||||
|
||||
@@ -1136,9 +1133,8 @@ def handle_check_race_course(self,
|
||||
return 0 # pragma: no cover
|
||||
|
||||
|
||||
@app.task(bind=True)
|
||||
def handle_getagegrouprecords(self,
|
||||
df,
|
||||
@job('default')
|
||||
def handle_getagegrouprecords(df,
|
||||
distances, durations,
|
||||
age, sex, weightcategory,
|
||||
**kwargs):
|
||||
@@ -1193,7 +1189,7 @@ def handle_getagegrouprecords(self,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_get_garmin_file(client_id,
|
||||
client_secret,
|
||||
garmintoken,
|
||||
@@ -1248,16 +1244,16 @@ def handle_get_garmin_file(client_id,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task(bind=True)
|
||||
def long_test_task(self, aantal, debug=False, myjob=None, session_key=None): # pragma: no cover
|
||||
@job('default')
|
||||
def long_test_task( aantal, debug=False, myjob=None, session_key=None): # pragma: no cover
|
||||
myjob = self.request
|
||||
|
||||
return longtask.longtask(aantal, jobid=myjob.id, debug=debug,
|
||||
session_key=session_key)
|
||||
|
||||
|
||||
@app.task(bind=True)
|
||||
def long_test_task2(self, aantal, **kwargs): # pragma: no cover
|
||||
@job('default')
|
||||
def long_test_task2( aantal, **kwargs): # pragma: no cover
|
||||
# debug=False,job=None,jobid='aap'):
|
||||
myjob = self.request
|
||||
job_id = myjob.id
|
||||
@@ -1272,8 +1268,8 @@ def long_test_task2(self, aantal, **kwargs): # pragma: no cover
|
||||
|
||||
# process and update workouts
|
||||
|
||||
@app.task(bind=True)
|
||||
def handle_update_empower(self,
|
||||
@job('default')
|
||||
def handle_update_empower(
|
||||
useremail,
|
||||
workoutdicts,
|
||||
debug=False, **kwargs): # pragma: no cover
|
||||
@@ -1354,7 +1350,7 @@ We have updated Power and Work per Stroke data according to the instructions by
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_calctrimp(id,
|
||||
csvfilename,
|
||||
ftp,
|
||||
@@ -1493,7 +1489,7 @@ def handle_calctrimp(id,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_updatedps(useremail, workoutids, debug=False, **kwargs):
|
||||
for wid, f1 in workoutids:
|
||||
havedata = 1
|
||||
@@ -1546,7 +1542,7 @@ def sigdig(value, digits=3):
|
||||
fmtstr = "%.0f"
|
||||
return fmtstr % (round(value, places))
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_send_email_noinvoice(
|
||||
useremail, userfirstname, userlastname, reason, **kwargs):
|
||||
|
||||
@@ -1563,7 +1559,7 @@ def handle_send_email_noinvoice(
|
||||
'paymentconfirmationemail_noinvoice.html',
|
||||
d, **kwargs)
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_send_email_alert(
|
||||
useremail, userfirstname, userlastname, rowerfirstname, rowerlastname,
|
||||
alertname, stats, **kwargs):
|
||||
@@ -1630,7 +1626,7 @@ def handle_send_email_alert(
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_send_email_transaction(
|
||||
username, useremail, amount, **kwargs):
|
||||
|
||||
@@ -1652,7 +1648,7 @@ def handle_send_email_transaction(
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_send_email_instantplan_notification(
|
||||
username, useremail, amount, planname, startdate, enddate, **kwargs
|
||||
): # pragma: no cover
|
||||
@@ -1678,7 +1674,7 @@ def handle_send_email_instantplan_notification(
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_send_email_failed_cancel(
|
||||
name, email, username, id, **kwargs):
|
||||
|
||||
@@ -1702,7 +1698,7 @@ def handle_send_email_failed_cancel(
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_send_email_subscription_update(
|
||||
username, useremail, planname, recurring, price, amount,
|
||||
end_of_billing_period, method, **kwargs):
|
||||
@@ -1741,7 +1737,7 @@ def handle_send_email_subscription_update(
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_send_email_subscription_create(
|
||||
username, useremail, planname, recurring, price, amount,
|
||||
end_of_billing_period, **kwargs):
|
||||
@@ -1772,7 +1768,7 @@ def handle_send_email_subscription_create(
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_raceregistration(
|
||||
useremail, username, registeredname, racename, raceid, **kwargs):
|
||||
|
||||
@@ -1841,7 +1837,7 @@ def handle_sendemail_coursefail(
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_optout(
|
||||
useremail, username, registeredname, racename, raceid, **kwargs):
|
||||
|
||||
@@ -1868,7 +1864,7 @@ def handle_sendemail_optout(
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_racesubmission(
|
||||
useremail, username, registeredname, racename, raceid, **kwargs):
|
||||
|
||||
@@ -1894,7 +1890,7 @@ def handle_sendemail_racesubmission(
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_send_disqualification_email(
|
||||
useremail, username, reason, message, racename, **kwargs):
|
||||
|
||||
@@ -1920,7 +1916,7 @@ def handle_send_disqualification_email(
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_send_withdraw_email(
|
||||
useremail, username, reason, message, racename, **kwargs):
|
||||
|
||||
@@ -1946,7 +1942,7 @@ def handle_send_withdraw_email(
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_expired(useremail, userfirstname, userlastname, expireddate,
|
||||
**kwargs):
|
||||
subject = "Your rowsandall.com paid account has expired"
|
||||
@@ -1964,7 +1960,7 @@ def handle_sendemail_expired(useremail, userfirstname, userlastname, expireddate
|
||||
d, cc=['support@rowsandall.com'], **kwargs)
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_newftp(rower,power,mode, **kwargs): # pragma: no cover
|
||||
subject = "You may want to update your FTP on rowsandall.com"
|
||||
from_email = 'Rowsandall <info@rowsandall.com>'
|
||||
@@ -1985,7 +1981,7 @@ def handle_sendemail_newftp(rower,power,mode, **kwargs): # pragma: no cover
|
||||
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_breakthrough(workoutid, useremail,
|
||||
userfirstname, userlastname,
|
||||
btvalues=pd.DataFrame().to_json(),
|
||||
@@ -2038,7 +2034,7 @@ def handle_sendemail_breakthrough(workoutid, useremail,
|
||||
# send email when a breakthrough workout is uploaded
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_hard(workoutid, useremail,
|
||||
userfirstname, userlastname,
|
||||
btvalues=pd.DataFrame().to_json(),
|
||||
@@ -2081,7 +2077,7 @@ def handle_sendemail_hard(workoutid, useremail,
|
||||
|
||||
|
||||
# send email when user deletes account
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_userdeleted(name, email, debug=False, **kwargs):
|
||||
fullemail = 'roosendaalsander@gmail.com'
|
||||
subject = 'User account deleted'
|
||||
@@ -2107,7 +2103,7 @@ def handle_sendemail_userdeleted(name, email, debug=False, **kwargs):
|
||||
# send email to me when an unrecognized file is uploaded
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_unrecognized(unrecognizedfile, useremail,
|
||||
debug=False, **kwargs):
|
||||
|
||||
@@ -2147,7 +2143,7 @@ def handle_sendemail_unrecognized(unrecognizedfile, useremail,
|
||||
|
||||
|
||||
# send email to owner when an unrecognized file is uploaded
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_unrecognizedowner(useremail, userfirstname,
|
||||
debug=False, **kwargs):
|
||||
|
||||
@@ -2169,7 +2165,7 @@ def handle_sendemail_unrecognizedowner(useremail, userfirstname,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemailics(first_name, last_name, email, icsfile, **kwargs):
|
||||
# send email with attachment
|
||||
fullemail = first_name + " " + last_name + " " + "<" + email + ">"
|
||||
@@ -2189,7 +2185,7 @@ def handle_sendemailics(first_name, last_name, email, icsfile, **kwargs):
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemailkml(first_name, last_name, email, kmlfile, **kwargs):
|
||||
|
||||
# send email with attachment
|
||||
@@ -2212,7 +2208,7 @@ def handle_sendemailkml(first_name, last_name, email, kmlfile, **kwargs):
|
||||
# Send email with TCX attachment
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemailtcx(first_name, last_name, email, tcxfile, **kwargs):
|
||||
|
||||
# send email with attachment
|
||||
@@ -2233,7 +2229,7 @@ def handle_sendemailtcx(first_name, last_name, email, tcxfile, **kwargs):
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_zip_file(emailfrom, subject, file, **kwargs): # pragma: no cover
|
||||
message = "... zip processing ... "
|
||||
try:
|
||||
@@ -2261,7 +2257,7 @@ def handle_zip_file(emailfrom, subject, file, **kwargs): # pragma: no cover
|
||||
# Send email with CSV attachment
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemailsummary(first_name, last_name, email, csvfile, **kwargs):
|
||||
fullemail = first_name + " " + last_name + " " + "<" + email + ">"
|
||||
subject = "File from Rowsandall.com"
|
||||
@@ -2285,7 +2281,7 @@ def handle_sendemailsummary(first_name, last_name, email, csvfile, **kwargs):
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemailcsv(first_name, last_name, email, csvfile, **kwargs):
|
||||
|
||||
# send email with attachment
|
||||
@@ -2305,7 +2301,7 @@ def handle_sendemailcsv(first_name, last_name, email, csvfile, **kwargs):
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_ical(first_name, last_name, email, url, icsfile, **kwargs):
|
||||
# send email with attachment
|
||||
fullemail = first_name + " " + last_name + " " + "<" + email + ">"
|
||||
@@ -2340,7 +2336,7 @@ def handle_sendemail_ical(first_name, last_name, email, url, icsfile, **kwargs):
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemailfile(first_name, last_name, email, csvfile, **kwargs):
|
||||
|
||||
# send email with attachment
|
||||
@@ -2373,8 +2369,8 @@ def handle_sendemailfile(first_name, last_name, email, csvfile, **kwargs):
|
||||
# Calculate wind and stream corrections for OTW rowing
|
||||
|
||||
|
||||
@app.task(bind=True)
|
||||
def handle_otwsetpower(self, f1, boattype, boatclass, coastalbrand, weightvalue,
|
||||
@job('default')
|
||||
def handle_otwsetpower( f1, boattype, boatclass, coastalbrand, weightvalue,
|
||||
first_name, last_name, email, workoutid,
|
||||
**kwargs):
|
||||
|
||||
@@ -2522,7 +2518,7 @@ def handle_otwsetpower(self, f1, boattype, boatclass, coastalbrand, weightvalue,
|
||||
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_makeplot(f1, f2, t, hrdata, plotnr, imagename,
|
||||
debug=False, **kwargs):
|
||||
|
||||
@@ -2615,7 +2611,7 @@ def handle_makeplot(f1, f2, t, hrdata, plotnr, imagename,
|
||||
# Team related remote tasks
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_coachrequest(email, name, code, coachname,
|
||||
debug=False, **kwargs):
|
||||
|
||||
@@ -2642,7 +2638,7 @@ def handle_sendemail_coachrequest(email, name, code, coachname,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_coachoffer_rejected(coachemail, coachname, name,
|
||||
debug=False, **kwargs):
|
||||
|
||||
@@ -2667,7 +2663,7 @@ def handle_sendemail_coachoffer_rejected(coachemail, coachname, name,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_coachrequest_rejected(email, coachname, name,
|
||||
debug=False, **kwargs):
|
||||
|
||||
@@ -2692,7 +2688,7 @@ def handle_sendemail_coachrequest_rejected(email, coachname, name,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_coachrequest_accepted(email, coachname, name,
|
||||
debug=False, **kwargs):
|
||||
|
||||
@@ -2717,7 +2713,7 @@ def handle_sendemail_coachrequest_accepted(email, coachname, name,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_coachoffer_accepted(coachemail, coachname, name,
|
||||
debug=False, **kwargs):
|
||||
|
||||
@@ -2742,7 +2738,7 @@ def handle_sendemail_coachoffer_accepted(coachemail, coachname, name,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_coacheerequest(email, name, code, coachname,
|
||||
debug=False, **kwargs):
|
||||
|
||||
@@ -2768,7 +2764,7 @@ def handle_sendemail_coacheerequest(email, name, code, coachname,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_invite(email, name, code, teamname, manager,
|
||||
debug=False, **kwargs):
|
||||
fullemail = email
|
||||
@@ -2795,7 +2791,7 @@ def handle_sendemail_invite(email, name, code, teamname, manager,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemailnewresponse(first_name, last_name,
|
||||
email,
|
||||
commenter_first_name,
|
||||
@@ -2842,7 +2838,7 @@ def handle_sendemailnewresponse(first_name, last_name,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemailnewcomment(first_name,
|
||||
last_name,
|
||||
email,
|
||||
@@ -2889,7 +2885,7 @@ def handle_sendemailnewcomment(first_name,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_send_template_email(template, email, fromemail, rowername,
|
||||
subject, message, debug=False, **kwargs):
|
||||
|
||||
@@ -2906,7 +2902,7 @@ def handle_send_template_email(template, email, fromemail, rowername,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_message(email, fromemail, rowername, message, teamname, managername,
|
||||
debug=False, **kwargs):
|
||||
|
||||
@@ -2927,7 +2923,7 @@ def handle_sendemail_message(email, fromemail, rowername, message, teamname, man
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_request(email, name, code, teamname, requestor, id,
|
||||
debug=False, **kwargs):
|
||||
fullemail = email
|
||||
@@ -2953,7 +2949,7 @@ def handle_sendemail_request(email, name, code, teamname, requestor, id,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_request_accept(email, name, teamname, managername,
|
||||
debug=False, **kwargs):
|
||||
fullemail = email
|
||||
@@ -2976,7 +2972,7 @@ def handle_sendemail_request_accept(email, name, teamname, managername,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_request_reject(email, name, teamname, managername,
|
||||
debug=False, **kwargs):
|
||||
fullemail = email
|
||||
@@ -2999,7 +2995,7 @@ def handle_sendemail_request_reject(email, name, teamname, managername,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_member_dropped(email, name, teamname, managername,
|
||||
debug=False, **kwargs):
|
||||
fullemail = email
|
||||
@@ -3022,7 +3018,7 @@ def handle_sendemail_member_dropped(email, name, teamname, managername,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_team_removed(email, name, teamname, managername,
|
||||
debug=False, **kwargs):
|
||||
|
||||
@@ -3046,7 +3042,7 @@ def handle_sendemail_team_removed(email, name, teamname, managername,
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_invite_reject(email, name, teamname, managername,
|
||||
debug=False, **kwargs):
|
||||
fullemail = email
|
||||
@@ -3071,7 +3067,7 @@ def handle_sendemail_invite_reject(email, name, teamname, managername,
|
||||
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_sendemail_invite_accept(email, name, teamname, managername,
|
||||
debug=False, **kwargs):
|
||||
fullemail = email
|
||||
@@ -3102,7 +3098,7 @@ def add2(x, y, debug=False, **kwargs): # pragma: no cover
|
||||
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_update_wps(rid, types, ids, mode, debug=False, **kwargs):
|
||||
df = read_data(['time', 'driveenergy'], ids=ids)
|
||||
try:
|
||||
@@ -3130,7 +3126,7 @@ def handle_update_wps(rid, types, ids, mode, debug=False, **kwargs):
|
||||
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_nk_async_workout(alldata, userid, nktoken, nkid, delaysec, defaulttimezone, debug=False, **kwargs):
|
||||
time.sleep(delaysec)
|
||||
|
||||
@@ -3206,7 +3202,7 @@ def handle_nk_async_workout(alldata, userid, nktoken, nkid, delaysec, defaulttim
|
||||
|
||||
return workoutid
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def handle_intervals_updateworkout(workout, debug=False, **kwargs):
|
||||
rower = workout.user
|
||||
intervalstoken = rower.intervals_token
|
||||
@@ -3317,7 +3313,7 @@ def df_from_summary(data):
|
||||
|
||||
|
||||
|
||||
@app.task
|
||||
@job('default')
|
||||
def fetch_rojabo_session(id,alldata,userid,rowerid,debug=False, **kwargs): # pragma: no cover
|
||||
try:
|
||||
item = alldata[id]
|
||||
|
||||
@@ -1063,7 +1063,7 @@ class ChallengesTest(TestCase):
|
||||
self.ThyroBaantje.id,
|
||||
self.result.id,
|
||||
self.wthyro.user.user.email,
|
||||
self.wthyro.user.user.first_name,
|
||||
self.wthyro.user.user.first_name
|
||||
)
|
||||
|
||||
self.assertEqual(res,1)
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user