Skip to content

Commit

Permalink
Fix potential use-before-defined of serverList variable
Browse files Browse the repository at this point in the history
  • Loading branch information
nOOb3167 authored and sfan5 committed May 18, 2018
1 parent 23d45c0 commit f43f201
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.py
Expand Up @@ -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).
Expand Down Expand Up @@ -401,6 +398,9 @@ def update(self, server):

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"])

0 comments on commit f43f201

Please sign in to comment.