Update main.py
Browse files
main.py
CHANGED
|
@@ -142,6 +142,7 @@ def redact_request(request_id: str, bucket: str = "doc_storage"):
|
|
| 142 |
The 'pending' write is done by the endpoint before this task is dispatched.
|
| 143 |
"""
|
| 144 |
try:
|
|
|
|
| 145 |
# Write 1: mark as redacting
|
| 146 |
set_request_status(request_id, "redacting")
|
| 147 |
|
|
@@ -171,6 +172,7 @@ def redact_request(request_id: str, bucket: str = "doc_storage"):
|
|
| 171 |
set_request_status(request_id, "redacted")
|
| 172 |
|
| 173 |
except Exception as e:
|
|
|
|
| 174 |
logger.error(f"Redaction failed for {request_id}: {str(e)}")
|
| 175 |
# Write 2 (error path): mark as failed
|
| 176 |
set_request_status(request_id, "failed")
|
|
|
|
| 142 |
The 'pending' write is done by the endpoint before this task is dispatched.
|
| 143 |
"""
|
| 144 |
try:
|
| 145 |
+
print("Request arrived at redact_request function")
|
| 146 |
# Write 1: mark as redacting
|
| 147 |
set_request_status(request_id, "redacting")
|
| 148 |
|
|
|
|
| 172 |
set_request_status(request_id, "redacted")
|
| 173 |
|
| 174 |
except Exception as e:
|
| 175 |
+
print(f"Redaction failed for {request_id}: {str(e)}")
|
| 176 |
logger.error(f"Redaction failed for {request_id}: {str(e)}")
|
| 177 |
# Write 2 (error path): mark as failed
|
| 178 |
set_request_status(request_id, "failed")
|