Exemplo n.º 1
0
def do_rest_server_command(bundle_cli, args):
    # Force initialization of the bundle store, so that the misc_temp directory is created
    bundle_cli.manager.bundle_store()
    if args.watch:
        run_server_with_watch()
    else:
        from codalab.server.rest_server import run_rest_server
        run_rest_server(bundle_cli.manager, args.debug, args.processes, args.threads)
Exemplo n.º 2
0
def do_rest_server_command(bundle_cli, args):
    bundle_cli._fail_if_headless(args)
    # Force initialization of the bundle store, so that the misc_temp directory is created
    bundle_cli.manager.bundle_store()
    if args.watch:
        run_server_with_watch()
    else:
        from codalab.server.rest_server import run_rest_server
        run_rest_server(bundle_cli.manager, args.debug, args.processes, args.threads)
Exemplo n.º 3
0
def do_rest_server_command(bundle_cli, args):
    bundle_cli._fail_if_headless(args)
    # Force initialization of the bundle store, so that the misc_temp directory is created
    bundle_cli.manager.bundle_store()
    if args.watch:
        run_server_with_watch()
    else:
        # initialize a Redis connection pool if supplied with redis args
        redis_connection_pool = None
        if args.redis_host and args.redis_port:
            redis_connection_pool = redis.ConnectionPool(host=args.redis_host, port=args.redis_port)
        from codalab.server.rest_server import run_rest_server
        run_rest_server(bundle_cli.manager, args.debug, args.processes, args.threads, redis_connection_pool)