mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 13:41:28 +00:00
Tidy with flake8
This commit is contained in:
+13
-13
@@ -10,25 +10,25 @@ counter = 0
|
||||
|
||||
|
||||
def spoolerHandler(env):
|
||||
global counter
|
||||
# Spooler is handling a task
|
||||
with open(LOGFILE, "a") as log:
|
||||
print("%s" % (env['name']), file=log)
|
||||
global counter
|
||||
# Spooler is handling a task
|
||||
with open(LOGFILE, "a") as log:
|
||||
print("%s" % (env['name']), file=log)
|
||||
|
||||
counter += 1
|
||||
counter += 1
|
||||
|
||||
if counter == len(tasks):
|
||||
# Each task has been processed.
|
||||
uwsgi.signal(17)
|
||||
if counter == len(tasks):
|
||||
# Each task has been processed.
|
||||
uwsgi.signal(17)
|
||||
|
||||
# Spooler has done handling the task
|
||||
return uwsgi.SPOOL_OK
|
||||
# Spooler has done handling the task
|
||||
return uwsgi.SPOOL_OK
|
||||
|
||||
uwsgi.spooler = spoolerHandler
|
||||
|
||||
# Clear the logfile
|
||||
try:
|
||||
remove(LOGFILE)
|
||||
remove(LOGFILE)
|
||||
except OSError, e: # log does not exist
|
||||
pass
|
||||
# print(e)
|
||||
pass
|
||||
# print(e)
|
||||
|
||||
Reference in New Issue
Block a user