sets own job ID on RQ jobs in production
This commit is contained in:
@@ -916,7 +916,10 @@ def handle_nonpainsled(f2, fileformat, summary=''):
|
||||
f_to_be_deleted = f2
|
||||
# should delete file
|
||||
f2 = f2[:-4] + 'o.csv'
|
||||
row.write_csv(f2, gzip=True)
|
||||
try:
|
||||
row.write_csv(f2, gzip=True)
|
||||
except:
|
||||
return (0,0,0,0)
|
||||
|
||||
# os.remove(f2)
|
||||
try:
|
||||
@@ -1009,6 +1012,9 @@ def new_workout_from_file(r, f2,
|
||||
f2, summary, oarlength, inboard = handle_nonpainsled(f2,
|
||||
fileformat,
|
||||
summary=summary)
|
||||
if not f2:
|
||||
message = 'Something went wrong'
|
||||
return (0, message, '')
|
||||
except:
|
||||
errorstring = str(sys.exc_info()[0])
|
||||
message = 'Something went wrong: ' + errorstring
|
||||
|
||||
Reference in New Issue
Block a user