Nav updates

This commit is contained in:
nmemmert committed 2025-11-06 13:28:45 -05:00
1 parent 36f1722fbe
commit 0eff4d1eaa
13 files changed
+204 -69

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env python3
"""
Simple test script to verify job processing works
"""
import sys
import os
sys.path.append(os.path.dirname(__file__))
from pdf_renamer import app, process_job, job_queue
import tempfile
import uuid
# Create app context for testing
with app.app_context():
# Create a test job with dummy files
job_id = str(uuid.uuid4())
job_queue[job_id] = {
'status': 'queued',
'files': [],
'zip_path': None,
'zip_name': None,
'processed_files': [],
'skipped': []
}
# Create some dummy file entries (they don't need to exist for this test)
file_list = [
{'name': 'test1.pdf', 'path': '/tmp/test1.pdf'},
{'name': 'test2.pdf', 'path': '/tmp/test2.pdf'}
]
job_queue[job_id]['files'] = file_list
print(f"Testing job processing for job_id: {job_id}")
print("Calling process_job...")
# Call process_job directly
process_job(job_id, file_list)
print("process_job completed")
print(f"Final job status: {job_queue[job_id]['status']}")