Skip to content

Commit b49ec5c

Browse files
committed
use model_cosntruct
1 parent adc9878 commit b49ec5c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

services/autoscaling/src/simcore_service_autoscaling/utils/rabbitmq.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def progress_tasks_message(
4242
async def post_task_progress_message(app: FastAPI, task: Task, progress: float) -> None:
4343
with log_catch(logger, reraise=False):
4444
simcore_label_keys = StandardSimcoreDockerLabels.from_docker_task(task)
45-
message = ProgressRabbitMessageNode.construct(
45+
message = ProgressRabbitMessageNode.model_construct(
4646
node_id=simcore_label_keys.node_id,
4747
user_id=simcore_label_keys.user_id,
4848
project_id=simcore_label_keys.project_id,
@@ -55,7 +55,7 @@ async def post_task_progress_message(app: FastAPI, task: Task, progress: float)
5555
async def post_task_log_message(app: FastAPI, task: Task, log: str, level: int) -> None:
5656
with log_catch(logger, reraise=False):
5757
simcore_label_keys = StandardSimcoreDockerLabels.from_docker_task(task)
58-
message = LoggerRabbitMessage.construct(
58+
message = LoggerRabbitMessage.model_construct(
5959
node_id=simcore_label_keys.node_id,
6060
user_id=simcore_label_keys.user_id,
6161
project_id=simcore_label_keys.project_id,
@@ -79,7 +79,7 @@ async def create_autoscaling_status_message(
7979
origin = f"dynamic:node_labels={app_settings.AUTOSCALING_NODES_MONITORING.NODES_MONITORING_NODE_LABELS}"
8080
elif app_settings.AUTOSCALING_DASK:
8181
origin = f"computational:scheduler_url={app_settings.AUTOSCALING_DASK.DASK_MONITORING_URL}"
82-
return RabbitAutoscalingStatusMessage.construct(
82+
return RabbitAutoscalingStatusMessage.model_construct(
8383
origin=origin,
8484
nodes_total=len(cluster.active_nodes)
8585
+ len(cluster.drained_nodes)

services/autoscaling/tests/unit/test_modules_dask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
_authentication_types = [
4444
NoAuthentication(),
45-
TLSAuthentication.construct(
45+
TLSAuthentication.model_construct(
4646
**TLSAuthentication.model_config["json_schema_extra"]["examples"][0]
4747
),
4848
]

0 commit comments

Comments
 (0)