feat: make tracking works
This commit is contained in:
parent
255be78d43
commit
4619c122f1
4 changed files with 70 additions and 8 deletions
|
@ -157,8 +157,7 @@ def create_state_report(cpu_usage: float, memory_usage: float,
|
|||
|
||||
|
||||
def create_image_detection(subscription_identifier: str, detection_data: Dict[str, Any],
|
||||
model_id: int, model_name: str,
|
||||
session_id: Optional[int] = None) -> ImageDetectionMessage:
|
||||
model_id: int, model_name: str) -> ImageDetectionMessage:
|
||||
"""
|
||||
Create an image detection message.
|
||||
|
||||
|
@ -167,7 +166,6 @@ def create_image_detection(subscription_identifier: str, detection_data: Dict[st
|
|||
detection_data: Flat dictionary of detection results
|
||||
model_id: Model identifier
|
||||
model_name: Model name
|
||||
session_id: Optional session ID
|
||||
|
||||
Returns:
|
||||
ImageDetectionMessage object
|
||||
|
@ -182,7 +180,6 @@ def create_image_detection(subscription_identifier: str, detection_data: Dict[st
|
|||
|
||||
return ImageDetectionMessage(
|
||||
subscriptionIdentifier=subscription_identifier,
|
||||
sessionId=session_id,
|
||||
data=data
|
||||
)
|
||||
|
||||
|
|
|
@ -108,7 +108,6 @@ class ImageDetectionMessage(BaseModel):
|
|||
type: Literal["imageDetection"] = "imageDetection"
|
||||
subscriptionIdentifier: str
|
||||
timestamp: str = Field(default_factory=lambda: datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S.%fZ"))
|
||||
sessionId: Optional[int] = None
|
||||
data: DetectionData
|
||||
|
||||
|
||||
|
|
|
@ -304,9 +304,9 @@ class WebSocketHandler:
|
|||
# Get pipeline configuration for this model
|
||||
pipeline_parser = model_manager.get_pipeline_config(model_id)
|
||||
if pipeline_parser:
|
||||
# Create tracking integration
|
||||
# Create tracking integration with message sender
|
||||
tracking_integration = TrackingPipelineIntegration(
|
||||
pipeline_parser, model_manager
|
||||
pipeline_parser, model_manager, self._send_message
|
||||
)
|
||||
|
||||
# Initialize tracking model
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue