mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-05 18:34:52 +00:00
Fix whitespace and indentation, per pep8
This commit is contained in:
@ -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__":
|
||||
|
Reference in New Issue
Block a user