Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 3
0
#!/usr/bin/env python
# -*- coding: utf8 -*-
from notifico.bots import start_manager
start_manager()