File tree 2 files changed +13
-4
lines changed
services/autoscaling/src/simcore_service_autoscaling 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 1
- from pydantic . errors import PydanticErrorMixin
1
+ from typing import Any
2
2
3
+ from models_library .errors_classes import OsparcErrorMixin
4
+
5
+
6
+ class AutoscalingRuntimeError (OsparcErrorMixin , RuntimeError ):
7
+ def __init__ (self , ** ctx : Any ) -> None :
8
+ super ().__init__ (** ctx )
3
9
4
- class AutoscalingRuntimeError (PydanticErrorMixin , RuntimeError ):
5
10
msg_template : str = "Autoscaling unexpected error"
6
11
7
12
8
13
class ConfigurationError (AutoscalingRuntimeError ):
9
14
msg_template : str = "Application misconfiguration: {msg}"
10
15
11
16
17
+ class Ec2InstanceInvalidError (AutoscalingRuntimeError ):
18
+ msg_template : str = "Invalid EC2 defined: {msg}"
19
+
20
+
12
21
class Ec2InvalidDnsNameError (AutoscalingRuntimeError ):
13
22
msg_template : str = "Invalid EC2 private DNS name {aws_private_dns_name}"
14
23
Original file line number Diff line number Diff line change @@ -626,7 +626,7 @@ async def _start_instances(
626
626
capped_needed_machines = await _cap_needed_instances (
627
627
app , needed_instances , new_instance_tags
628
628
)
629
- except Ec2TooManyInstancesError :
629
+ except EC2TooManyInstancesError :
630
630
await auto_scaling_mode .log_message_from_tasks (
631
631
app ,
632
632
tasks ,
@@ -668,7 +668,7 @@ async def _start_instances(
668
668
last_issue = ""
669
669
new_pending_instances : list [EC2InstanceData ] = []
670
670
for r in results :
671
- if isinstance (r , Ec2TooManyInstancesError ):
671
+ if isinstance (r , EC2TooManyInstancesError ):
672
672
await auto_scaling_mode .log_message_from_tasks (
673
673
app ,
674
674
tasks ,
You can’t perform that action at this time.
0 commit comments