Fix job progress display issue

- Fixed backend get_progress handler to use queue ID instead of cluster job ID
- Removed duplicate get_progress handler that was causing confusion
- Progress is now correctly retrieved from the processing_queue table using the queue ID

This resolves the issue where job progress was always showing 'Processing...' instead of actual progress status and advancement bar.
parent 31f489b6
......@@ -107,9 +107,9 @@ def handle_web_message(message: Message, client_sock=None) -> Message:
# Get progress from database
job_id = message.data.get('job_id')
if job_id:
from .database import get_queue_by_job_id
job = get_queue_by_job_id(job_id)
if job:
from .database import get_queue_status
job = get_queue_status(job_id)
if job and job.get('progress', 0) > 0:
progress_data = {
'job_id': job_id,
'progress': job.get('progress', 0),
......@@ -126,15 +126,6 @@ def handle_web_message(message: Message, client_sock=None) -> Message:
return result
else:
return Message('result_pending', message.msg_id, {'status': 'pending'})
elif message.msg_type == 'get_progress':
# Check for pending progress update
job_id = message.data.get('job_id')
progress_key = f"progress_{job_id}"
if progress_key in pending_results:
progress = pending_results[progress_key]
return progress
else:
return Message('progress_pending', message.msg_id, {'status': 'no_progress'})
return Message('error', message.msg_id, {'error': 'Unknown message type'})
......
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