Processing fix
This commit is contained in:
1 parent
c98e89b5e4
commit
9a430e798f
6 files changed
+132
-24
No files matched your search
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Test script to verify progress updates are working
|
||||
"""
|
||||
import json
|
||||
from pdf_renamer import job_queue, load_jobs, save_jobs
|
||||
|
||||
# Load current jobs
|
||||
load_jobs()
|
||||
print('Current jobs:')
|
||||
for job_id, job in job_queue.items():
|
||||
status = job.get('status', 'unknown')
|
||||
progress = job.get('progress', 'none')
|
||||
print(f' {job_id}: status={status}, progress="{progress}"')
|
||||
|
||||
# Test updating progress
|
||||
if job_queue:
|
||||
test_job_id = list(job_queue.keys())[0]
|
||||
print(f'\nTesting progress update for job {test_job_id}')
|
||||
|
||||
# Update progress
|
||||
job_queue[test_job_id]['progress'] = 'Test progress update - ' + str(len(job_queue))
|
||||
save_jobs()
|
||||
|
||||
# Reload and check
|
||||
job_queue.clear()
|
||||
load_jobs()
|
||||
|
||||
updated_progress = job_queue.get(test_job_id, {}).get('progress', 'not found')
|
||||
print(f'Updated progress: "{updated_progress}"')
|
||||
|
||||
if 'Test progress update' in updated_progress:
|
||||
print('✅ Progress updates are working!')
|
||||
else:
|
||||
print('❌ Progress updates not working')
|
||||
else:
|
||||
print('No jobs found to test with')
|
||||
Reference in new issue
Block a user