Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not retry processing when there is no picture #199

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

amureki
Copy link
Collaborator

@amureki amureki commented Feb 5, 2025

This comes as an outcome of discussion #182

@amureki amureki self-assigned this Feb 5, 2025
@amureki amureki force-pushed the do-not-retry-when-no-file branch from bf23124 to 3c5cba4 Compare February 5, 2025 14:38
@amureki amureki force-pushed the do-not-retry-when-no-file branch from 3c5cba4 to 2a3dbd6 Compare February 5, 2025 14:42
Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ca6e0d6) to head (7c73c82).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #199   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          496       496           
=========================================
  Hits           496       496           
Flag Coverage Δ
celery 85.08% <0.00%> (ø)
cleanup 88.50% <0.00%> (ø)
dj4.1 88.50% <0.00%> (ø)
dj4.2 88.50% <0.00%> (ø)
django-rq 85.08% <0.00%> (ø)
dramatiq 85.08% <100.00%> (ø)
drf 96.37% <0.00%> (ø)
macos-latest 88.70% <0.00%> (ø)
py3.10 88.50% <0.00%> (ø)
py3.12 88.50% <0.00%> (ø)
py3.8 88.50% <0.00%> (ø)
py3.9 88.50% <0.00%> (ø)
ubuntu-latest 88.50% <0.00%> (ø)
windows-latest 81.76% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amureki amureki requested a review from codingjoe February 5, 2025 14:45
Comment on lines 42 to 44
except FileNotFoundError:
# The file no longer exists (for example, because it was deleted or replaced).
return
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just silently ignoring missing files, will make it challenging to debug potential errors. I believe all message queues we use have a native behavior to fail without retrying on explicit exceptions. I'd recommend exploring that route.

Copy link
Collaborator Author

@amureki amureki Feb 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codingjoe hm, this is a good suggestion!
I am struggling with figuring out the good way of doing so in django-rq (the interface is quite different from what I used to see in the other queues).
I added an example commit of how I see it with celery and dramatiq:
7c73c82

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have much experience with RQ either, let's ask @krtko1
Do you have any idea how to solve this in RQ?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amureki my search only brought up this https://github.com/rq/rq/pull/1480/files

@amureki amureki force-pushed the do-not-retry-when-no-file branch from acc5822 to 7c73c82 Compare February 11, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants