pep8 in scripts/*.py

This commit is contained in:
mdipierro
2012-10-19 14:22:42 -05:00
parent d053900032
commit 295084976b
24 changed files with 781 additions and 720 deletions
+4 -5
View File
@@ -10,17 +10,16 @@ DB_URI = 'sqlite://sessions.sqlite'
EXPIRATION_MINUTES = 60
SLEEP_MINUTES = 5
while 1: # Infinite loop
now = time() # get current Unix timestamp
while 1: # Infinite loop
now = time() # get current Unix timestamp
for row in db().select(db.web2py_session_welcome.ALL):
t = row.modified_datetime
# Convert to a Unix timestamp
t = mktime(t.timetuple())+1e-6*t.microsecond
t = mktime(t.timetuple()) + 1e-6 * t.microsecond
if now - t > EXPIRATION_MINUTES * 60:
del db.web2py_session_welcome[row.id]
db.commit() # Write changes to database
db.commit() # Write changes to database
sleep(SLEEP_MINUTES * 60)