Ensure queue_id is int for proper comparison

- Convert queue_id to int in assign_job_to_worker and cancel_job
- Fixes type mismatch issues between str and int comparisons
- Ensures active_jobs lookup works correctly
parent acfaf858
...@@ -504,6 +504,9 @@ class ClusterMaster: ...@@ -504,6 +504,9 @@ class ClusterMaster:
from .models import estimate_model_vram_requirements from .models import estimate_model_vram_requirements
import uuid import uuid
if queue_id is not None:
queue_id = int(queue_id)
client_id = self.processes[worker_key]['client_id'] client_id = self.processes[worker_key]['client_id']
model_path = job_data.get('model_path', 'Qwen/Qwen2.5-VL-7B-Instruct') model_path = job_data.get('model_path', 'Qwen/Qwen2.5-VL-7B-Instruct')
......
...@@ -72,6 +72,9 @@ class QueueManager: ...@@ -72,6 +72,9 @@ class QueueManager:
if job['status'] not in ['queued', 'processing']: if job['status'] not in ['queued', 'processing']:
return False return False
# Ensure queue_id is int for comparison
queue_id = int(queue_id)
# If job was processing, send cancel command to worker and clean up active job # If job was processing, send cancel command to worker and clean up active job
cancelled_job_id = None cancelled_job_id = None
if job['status'] == 'processing': if job['status'] == 'processing':
......
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