Fix undefined job_id variable in worker analysis by using message.msg_id

parent 5ee420fb
......@@ -280,8 +280,8 @@ def worker_process(backend_type: str):
prompt = data.get('prompt', 'Describe this image.')
model_path = data.get('model_path', 'Qwen/Qwen2.5-VL-7B-Instruct')
interval = data.get('interval', 10)
queue_id = data.get('queue_id') # Extract queue_id for cancellation checking
print(f"DEBUG: Starting analysis of {media_path} with model {model_path} for job {message.msg_id}")
job_id = message.msg_id # Use message ID for job identification
print(f"DEBUG: Starting analysis of {media_path} with model {model_path} for job {job_id}")
result = analyze_media(media_path, prompt, model_path, interval, job_id)
print(f"DEBUG: Analysis completed for job {message.msg_id}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment