Invert blocklist scheduler dependency to task callback
This commit is contained in:
@@ -70,6 +70,9 @@ async def _run_import_with_resources(settings: Settings, http_session: ClientSes
|
||||
await db.close()
|
||||
|
||||
|
||||
run_import_with_resources = _run_import_with_resources
|
||||
|
||||
|
||||
async def _run_import(app: FastAPI) -> None:
|
||||
await _run_import_with_resources(get_effective_settings(app), app.state.http_session)
|
||||
|
||||
@@ -136,4 +139,5 @@ def _apply_schedule(app: FastAPI, config: Any) -> None:
|
||||
get_effective_settings(app),
|
||||
app.state.http_session,
|
||||
config,
|
||||
run_import_with_resources,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user