more pep
This commit is contained in:
@@ -14,7 +14,6 @@ redis_connection = StrictRedis()
|
||||
|
||||
|
||||
def getvalue(data): # pragma: no cover
|
||||
perc = 0
|
||||
total = 1
|
||||
done = 0
|
||||
id = 0
|
||||
@@ -43,8 +42,7 @@ def longtask(aantal, jobid=None, debug=False,
|
||||
if counter > 10:
|
||||
counter = 0
|
||||
if debug:
|
||||
progress = 100.*i/aantal
|
||||
if jobid != None:
|
||||
if jobid is not None:
|
||||
redis_connection.publish(channel, json.dumps(
|
||||
{
|
||||
'done': i,
|
||||
@@ -60,7 +58,6 @@ def longtask(aantal, jobid=None, debug=False,
|
||||
def longtask2(aantal, jobid=None, debug=False, secret=''): # pragma: no cover
|
||||
counter = 0
|
||||
|
||||
channel = 'tasks'
|
||||
for i in range(aantal):
|
||||
time.sleep(1)
|
||||
counter += 1
|
||||
@@ -69,7 +66,7 @@ def longtask2(aantal, jobid=None, debug=False, secret=''): # pragma: no cover
|
||||
progress = int(100.*i/aantal)
|
||||
if debug:
|
||||
print(progress)
|
||||
if jobid != None:
|
||||
if jobid is not None:
|
||||
if debug:
|
||||
url = SITE_URL_DEV
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user