ganesh-vilje commited on
Commit
b1206db
·
1 Parent(s): d6a6b32

Fix: Add missing generate_message_id function to schemas.py

Browse files
Files changed (1) hide show
  1. services/schemas.py +6 -0
services/schemas.py CHANGED
@@ -253,6 +253,12 @@ def generate_component_id(pipeline_id: str, index: int) -> str:
253
  return f"{pipeline_id}_{index}"
254
 
255
 
 
 
 
 
 
 
256
  def generate_output_id() -> str:
257
  """Generate unique output ID for downloads"""
258
  return f"output_{uuid.uuid4().hex[:12]}"
 
253
  return f"{pipeline_id}_{index}"
254
 
255
 
256
+ def generate_message_id() -> str:
257
+ """Generate unique message ID using MongoDB ObjectId format"""
258
+ from bson import ObjectId
259
+ return str(ObjectId())
260
+
261
+
262
  def generate_output_id() -> str:
263
  """Generate unique output ID for downloads"""
264
  return f"output_{uuid.uuid4().hex[:12]}"