Fix potential use-before-defined of serverList variable
This commit is contained in:
parent
23d45c0a15
commit
f43f201af5
@ -139,9 +139,6 @@ def announce():
|
||||
|
||||
return "Thanks, your request has been filed.", 202
|
||||
|
||||
sched.add_job(lambda: serverList.purgeOld(), "interval",
|
||||
seconds=60, coalesce=True, max_instances=1)
|
||||
|
||||
# Utilities
|
||||
|
||||
# Returns ping time in seconds (up), False (down), or None (error).
|
||||
@ -401,6 +398,9 @@ class ServerList:
|
||||
|
||||
serverList = ServerList()
|
||||
|
||||
sched.add_job(lambda: serverList.purgeOld(), "interval",
|
||||
seconds=60, coalesce=True, max_instances=1)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host = app.config["HOST"], port = app.config["PORT"])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user