Assume that whenever a final call is made to a task (success or failure with error traceback) then this is the last time results are required and consequently delete resources using AsyncResult.forget().
This is a suggestion and if you are any wiser you may implement something else
See https://docs.celeryproject.org/en/stable/getting-started/first-steps-with-celery.html#configuration that describes how storing results consumes resources and explains how to free them.
Assume that whenever a final call is made to a task (success or failure with error traceback) then this is the last time results are required and consequently delete resources using AsyncResult.forget().
This is a suggestion and if you are any wiser you may implement something else