fix: Manual scanning
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 35s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 51s
Deploy to Staging / Verify Staging (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped

This commit is contained in:
Eric Gullickson
2026-02-11 19:57:32 -06:00
parent b97d226d44
commit a078962d3f
2 changed files with 10 additions and 5 deletions

View File

@@ -359,8 +359,8 @@ async def process_manual_job(job_id: str) -> None:
# Update status to processing # Update status to processing
await job_queue.update_manual_job_progress(job_id, 5, "Starting extraction") await job_queue.update_manual_job_progress(job_id, 5, "Starting extraction")
# Get job data # Get job data (must use manual-specific key prefix)
file_bytes = await job_queue.get_job_data(job_id) file_bytes = await job_queue.get_manual_job_data(job_id)
if not file_bytes: if not file_bytes:
await job_queue.fail_manual_job(job_id, "Job data not found") await job_queue.fail_manual_job(job_id, "Job data not found")
return return

View File

@@ -207,10 +207,15 @@ class JobQueue:
async def get_job_data(self, job_id: str) -> Optional[bytes]: async def get_job_data(self, job_id: str) -> Optional[bytes]:
"""Get the file data for a job.""" """Get the file data for a job."""
r = await self.get_redis() return await self._get_raw_data(f"{JOB_DATA_PREFIX}{job_id}")
data_key = f"{JOB_DATA_PREFIX}{job_id}"
# Get raw bytes (not decoded) async def get_manual_job_data(self, job_id: str) -> Optional[bytes]:
"""Get the file data for a manual extraction job."""
return await self._get_raw_data(f"{MANUAL_JOB_DATA_PREFIX}{job_id}")
async def _get_raw_data(self, data_key: str) -> Optional[bytes]:
"""Get raw binary data from Redis."""
# Need separate connection with decode_responses=False for binary data
raw_redis = redis.Redis( raw_redis = redis.Redis(
host=settings.redis_host, host=settings.redis_host,
port=settings.redis_port, port=settings.redis_port,