Esempio n. 1
0
def _init_app(
    app: FastAPI,
    context: dask_sql.Context = None,
    client: dask.distributed.Client = None,
):
    app.c = context or Context()
    app.future_list = {}
    app.client = client or dask.distributed.Client()
Esempio n. 2
0
def _init_app(
    app: FastAPI, context: Context = None, client: dask.distributed.Client = None,
):
    app.c = context or Context()
    app.future_list = {}

    try:
        client = client or dask.distributed.Client.current()
    except ValueError:
        client = dask.distributed.Client()
    app.client = client