./ctl start to run without logging
This commit is contained in:
parent
74d5b21df0
commit
81065fe26c
3 changed files with 11 additions and 9 deletions
3
ctl
3
ctl
|
@ -41,7 +41,8 @@ if [ "$1" == "start" ]; then
|
|||
echo openmedialibrary already running
|
||||
exit 1
|
||||
fi
|
||||
python2 oml server PID &
|
||||
python2 oml server $PID
|
||||
rm -f $PID
|
||||
exit $?
|
||||
fi
|
||||
if [ "$1" == "debug" ]; then
|
||||
|
|
10
oml/app.py
10
oml/app.py
|
@ -21,12 +21,6 @@ import api
|
|||
|
||||
import commands
|
||||
|
||||
#FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s'
|
||||
#logging.basicConfig(format=FORMAT)
|
||||
#logger = logging.getLogger('oml.app')
|
||||
#logger.warning('test')
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
app = Flask('openmedialibrary', static_folder=settings.static_path)
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////%s' % settings.db_path
|
||||
db.init_app(app)
|
||||
|
@ -38,8 +32,8 @@ manager.add_command('db', MigrateCommand)
|
|||
manager.add_command('release', commands.Release)
|
||||
manager.add_command('debug', commands.Debug)
|
||||
manager.add_command('update', commands.Update)
|
||||
#manager.add_command('start', commands.Start)
|
||||
#manager.add_command('stop', commands.Stop)
|
||||
manager.add_command('start', commands.Start)
|
||||
manager.add_command('stop', commands.Stop)
|
||||
manager.add_command('setup', commands.Setup)
|
||||
manager.add_command('version', commands.Version)
|
||||
manager.add_command('postupdate', commands.PostUpdate)
|
||||
|
|
|
@ -11,6 +11,7 @@ from tornado.ioloop import IOLoop
|
|||
from app import app
|
||||
import settings
|
||||
import websocket
|
||||
import logging
|
||||
|
||||
import state
|
||||
import node.server
|
||||
|
@ -32,6 +33,12 @@ def run():
|
|||
PID = sys.argv[2] if len(sys.argv) > 2 else None
|
||||
|
||||
static_path = os.path.join(root_dir, 'static')
|
||||
#FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s'
|
||||
#logging.basicConfig(format=FORMAT)
|
||||
#logger = logging.getLogger('oml.app')
|
||||
#logger.warning('test')
|
||||
if not PID:
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
options = {
|
||||
'debug': False,
|
||||
|
|
Loading…
Reference in a new issue