예제 #1
0
def main(argv):
    args = docopt(__doc__, argv=argv[1:])

    if args['www']:
        app = create_instance()
        app.run(debug=args['--debug'],
                port=int(args['--port']),
                host=args['--host'])
    if args['bots']:
        start_manager()
    elif args['init']:
        app = create_instance()
        with app.app_context():
            # Let SQLAlchemy create any missing tables.
            db.create_all()
예제 #2
0
def main(argv):
    args = docopt(__doc__, argv=argv[1:])

    if args['www']:
        app = create_instance()
        app.run(
            debug=args['--debug'],
            port=int(args['--port']),
            host=args['--host']
        )
    elif args ['bots']:
        start_manager()
    elif args['init']:
        app = create_instance()
        with app.app_context():
            # Let SQLAlchemy create any missing tables.
            db.create_all()
    elif args['worker']:
        app = create_instance()
        with app.app_context():
            celery.start()
예제 #3
0
파일: __main__.py 프로젝트: Forkk/notifico
#!/usr/bin/env python
# -*- coding: utf8 -*-
from notifico.bots import start_manager
start_manager()