@@ -40,7 +40,7 @@ class Event(str, Enum):
40
40
class EventPersistStateData (BaseModel ):
41
41
"""Data for the persist state event."""
42
42
43
- model_config = ConfigDict (populate_by_name = True )
43
+ model_config = ConfigDict (validate_by_name = True , validate_by_alias = True )
44
44
45
45
is_migrating : Annotated [bool , Field (alias = 'isMigrating' )]
46
46
@@ -49,7 +49,7 @@ class EventPersistStateData(BaseModel):
49
49
class EventSystemInfoData (BaseModel ):
50
50
"""Data for the system info event."""
51
51
52
- model_config = ConfigDict (populate_by_name = True )
52
+ model_config = ConfigDict (validate_by_name = True , validate_by_alias = True )
53
53
54
54
cpu_info : Annotated [CpuInfo , Field (alias = 'cpuInfo' )]
55
55
memory_info : Annotated [
@@ -62,7 +62,7 @@ class EventSystemInfoData(BaseModel):
62
62
class EventMigratingData (BaseModel ):
63
63
"""Data for the migrating event."""
64
64
65
- model_config = ConfigDict (populate_by_name = True )
65
+ model_config = ConfigDict (validate_by_name = True , validate_by_alias = True )
66
66
67
67
# The remaining time in seconds before the migration is forced and the process is killed
68
68
# Optional because it's not present when the event handler is called manually
@@ -73,21 +73,21 @@ class EventMigratingData(BaseModel):
73
73
class EventAbortingData (BaseModel ):
74
74
"""Data for the aborting event."""
75
75
76
- model_config = ConfigDict (populate_by_name = True )
76
+ model_config = ConfigDict (validate_by_name = True , validate_by_alias = True )
77
77
78
78
79
79
@docs_group ('Event data' )
80
80
class EventExitData (BaseModel ):
81
81
"""Data for the exit event."""
82
82
83
- model_config = ConfigDict (populate_by_name = True )
83
+ model_config = ConfigDict (validate_by_name = True , validate_by_alias = True )
84
84
85
85
86
86
@docs_group ('Event data' )
87
87
class EventCrawlerStatusData (BaseModel ):
88
88
"""Data for the crawler status event."""
89
89
90
- model_config = ConfigDict (populate_by_name = True )
90
+ model_config = ConfigDict (validate_by_name = True , validate_by_alias = True )
91
91
92
92
message : str
93
93
"""A message describing the current status of the crawler."""
0 commit comments