Private
Public Access
1
0

background upload now really in background job

This commit is contained in:
Sander Roosendaal
2021-12-17 08:48:20 +01:00
parent 03ab63fe33
commit 27a560c5a7
5 changed files with 31 additions and 7 deletions

View File

@@ -28,7 +28,8 @@ from rowingdata import (
from rowers.tasks import (
handle_sendemail_unrecognized,handle_setcp,
handle_getagegrouprecords, handle_update_wps
handle_getagegrouprecords, handle_update_wps,
handle_request_post
)
from rowers.tasks import handle_zip_file
@@ -76,6 +77,7 @@ allowedcolumns = [key for key,value in strokedatafields.items()]
#from async_messages import messages as a_messages
import os
import zipfile
from zipfile import BadZipFile
import pandas as pd
import numpy as np
import itertools
@@ -2119,7 +2121,11 @@ def new_workout_from_file(r, f2,
uploadoptions['file'] = datafile
url = settings.UPLOAD_SERVICE_URL
response = requests.post(url,uploadoptions)
job = myqueue(queuehigh,
handle_request_post,
url,
uploadoptions
)
except BadZipFile: # pragma: no cover
pass