Private
Public Access
1
0

sets own job ID on RQ jobs in production

This commit is contained in:
Sander Roosendaal
2017-11-02 08:32:55 +01:00
parent df7577813f
commit b17cf3d6dd
4 changed files with 27 additions and 6 deletions

View File

@@ -13,6 +13,7 @@ import threading
import requests
from rowsandall_app.settings import SITE_URL
from rowsandall_app.settings_dev import SITE_URL as SITE_URL_DEV
def getvalue(data):
perc = 0
@@ -73,7 +74,11 @@ def longtask2(aantal,jobid=None,debug=False):
if debug:
print progress
if jobid != None:
url = SITE_URL+"/rowers/record-progress/"
if debug:
url = SITE_URL_DEV
else:
url = SITE_URL
url += "/rowers/record-progress/"
url += str(progress)+"/"+jobid
s = requests.get(url)
if debug: