Fix whitespace and indentation, per pep8

This commit is contained in:
Magnus Hagander
2019-01-17 20:47:43 +01:00
parent 87237f6536
commit 0883ac6423
114 changed files with 890 additions and 548 deletions

View File

@ -15,6 +15,7 @@ import logging
import psycopg2
from setproctitle import setproctitle
def do_purge(consumername, headers):
try:
conn = httplib.HTTPSConnection('%s.postgresql.org' % consumername)
@ -30,6 +31,7 @@ def do_purge(consumername, headers):
return False
return True
def worker(consumerid, consumername, dsn):
logging.info("Starting worker for %s" % consumername)
setproctitle("varnish_queue - worker for %s" % consumername)
@ -85,7 +87,7 @@ def worker(consumerid, consumername, dsn):
# Nothing, so roll back the transaction and wait
conn.rollback()
select.select([conn],[],[],5*60)
select.select([conn], [], [], 5 * 60)
conn.poll()
while conn.notifies:
conn.notifies.pop()
@ -104,7 +106,7 @@ def housekeeper(dsn):
conn.commit()
else:
conn.rollback()
time.sleep(5*60)
time.sleep(5 * 60)
if __name__ == "__main__":