File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
services/web/server/src/simcore_service_webserver Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -588,6 +588,9 @@ def to_client_statics(self) -> dict[str, Any]:
588588 "WEBSERVER_TRASH" : {
589589 "TRASH_RETENTION_DAYS" ,
590590 },
591+ "WEBSERVER_LONG_RUNNING_TASKS" : {
592+ "LONG_RUNNING_TASKS_NAMESPACE_SUFFIX" ,
593+ },
591594 },
592595 exclude_none = True ,
593596 )
Original file line number Diff line number Diff line change 44
55from aiohttp import web
66from models_library .utils .fastapi_encoders import jsonable_encoder
7- from servicelib .aiohttp .application_setup import ensure_single_setup
7+ from servicelib .aiohttp .application_setup import app_module_setup
88from servicelib .aiohttp .long_running_tasks ._constants import (
99 RQT_LONG_RUNNING_TASKS_CONTEXT_KEY ,
1010)
1111from servicelib .aiohttp .long_running_tasks .server import setup
1212from servicelib .aiohttp .typing_extension import Handler
13+ from simcore_service_webserver .rabbitmq import ModuleCategory
1314
1415from .. import rabbitmq_settings , redis
1516from .._meta import API_VTAG
@@ -41,7 +42,12 @@ async def _test_task_context_decorator(
4142 return _test_task_context_decorator
4243
4344
44- @ensure_single_setup (__name__ , logger = _logger )
45+ @app_module_setup (
46+ __name__ ,
47+ ModuleCategory .ADDON ,
48+ settings_name = "WEBSERVER_LONG_RUNNING_TASKS" ,
49+ logger = _logger ,
50+ )
4551def setup_long_running_tasks (app : web .Application ) -> None :
4652 # register all long-running tasks from different modules
4753 register_projects_long_running_tasks (app )
You can’t perform that action at this time.
0 commit comments