Skip to content

Commit

Permalink
Add opening pid file and writing pid to it for issue #8
Browse files Browse the repository at this point in the history
  • Loading branch information
steven6282 committed Mar 7, 2018
1 parent 1630521 commit 15c6451
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,5 @@ venv.bak/
.mypy_cache/

# database
makermon.db
makermon.db
m_server.pid
5 changes: 5 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import os
import sys
import sqlite3
import tornado.ioloop
import tornado.web

import database
import uimodules


PATH = os.path.dirname(os.path.realpath(__file__))
pid = str( os.getpid() )
pid_file = open( 'm_server.pid', 'r+' )
pid_file.write( pid )

class MainHandler(tornado.web.RequestHandler):
def get(self):
Expand Down

0 comments on commit 15c6451

Please sign in to comment.