forked from mtusi2026/mtusi2026lab5
feat(worker): enforce image processing timeout with child process
This commit is contained in:
@@ -31,7 +31,7 @@ func (w *Worker) finishFailure(ctx context.Context, job model.AttachmentJob, cau
|
||||
}
|
||||
|
||||
code := "processing_failed"
|
||||
permanent := errors.Is(cause, errInvalidSource) || errors.Is(cause, s3store.ErrObjectNotFound)
|
||||
permanent := errors.Is(cause, ErrInvalidSource) || errors.Is(cause, s3store.ErrObjectNotFound)
|
||||
if permanent {
|
||||
code = "invalid_source"
|
||||
} else if errors.Is(cause, context.DeadlineExceeded) {
|
||||
|
||||
Reference in New Issue
Block a user