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