Python + Celery: ignore task results for each call?

Is it possible to ignore task results based on each call?

For example, I can ignore the results of tasks when they are executed during a web request, but wait for the result (which may have, for example, debugging information) when I run the task in interactive mode?

I know that Tasks has a flag ignore_result, but I wonder if it is possible to set ignore_resultfor each call (and not for the "global" one).

+3
source share
1 answer

Typically, since ignore_result is a property of a task that only employees use (to decide whether to send the result back).

, ( ignore_result), ignore_result :

task mytask(please_ignore_result):
    mytask.ignore_result = please_ignore_result
+1

Source: https://habr.com/ru/post/1770198/


All Articles