diff --git a/pictures/tasks.py b/pictures/tasks.py index 48d0223..9d708f9 100644 --- a/pictures/tasks.py +++ b/pictures/tasks.py @@ -53,7 +53,9 @@ def _process_picture( pass else: - @dramatiq.actor(queue_name=conf.get_settings().QUEUE_NAME) + @dramatiq.actor( + queue_name=conf.get_settings().QUEUE_NAME, throws=(FileNotFoundError,) + ) def process_picture_with_dramatiq( storage: tuple[str, list, dict], file_name: str, @@ -87,6 +89,7 @@ def process_picture( # noqa: F811 @shared_task( ignore_results=True, retry_backoff=True, + dont_autoretry_for=(FileNotFoundError,), ) def process_picture_with_celery( storage: tuple[str, list, dict],