Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Commit

Permalink
Restart server when wired things happen
Browse files Browse the repository at this point in the history
  • Loading branch information
HeatMint committed Sep 19, 2018
1 parent 36952dd commit 61d5bf9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ def statics(path):
debug=True
)'''

http_server = HTTPServer(WSGIContainer(app))
http_server.listen(5000)
IOLoop.instance().start()
def main():
try:
http_server = HTTPServer(WSGIContainer(app))
http_server.listen(5000)
IOLoop.instance().start()
except Exception:
main()
print("restart!")

main()

0 comments on commit 61d5bf9

Please sign in to comment.