Skip to content
Snippets Groups Projects
Verified Commit 4048e5b1 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add setting CELERY_HAYSTACK_IGNORE_RESULT

If True, results of the signal handler task will not be written to any
result store to not produce large amounts of irrelevant results.

Errors will still be stored.
parent d27398de
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,8 @@ class CeleryHaystack(AppConf): ...@@ -20,6 +20,8 @@ class CeleryHaystack(AppConf):
QUEUE = None QUEUE = None
#: Whether the task should be handled transaction safe #: Whether the task should be handled transaction safe
TRANSACTION_SAFE = True TRANSACTION_SAFE = True
#: Whether the task results should be ignored
IGNORE_RESULT = False
#: The batch size used by the CeleryHaystackUpdateIndex task #: The batch size used by the CeleryHaystackUpdateIndex task
COMMAND_BATCH_SIZE = None COMMAND_BATCH_SIZE = None
......
...@@ -17,6 +17,8 @@ class CeleryHaystackSignalHandler(Task): ...@@ -17,6 +17,8 @@ class CeleryHaystackSignalHandler(Task):
using = settings.CELERY_HAYSTACK_DEFAULT_ALIAS using = settings.CELERY_HAYSTACK_DEFAULT_ALIAS
max_retries = settings.CELERY_HAYSTACK_MAX_RETRIES max_retries = settings.CELERY_HAYSTACK_MAX_RETRIES
default_retry_delay = settings.CELERY_HAYSTACK_RETRY_DELAY default_retry_delay = settings.CELERY_HAYSTACK_RETRY_DELAY
ignore_result = settings.CELERY_HAYSTACK_IGNORE_RESULT
store_errors_even_if_ignored = True
def split_identifier(self, identifier, **kwargs): def split_identifier(self, identifier, **kwargs):
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment