Closed alecbarber closed 3 days ago
Resolves #166
Task.replace() either applys the provided signature eagerly, or raises Ignore [1]. Here's a silly example which this PR fixes:
Task.replace()
apply
Ignore
from celery import Celery, Task app = Celery() @app.task(bind=True) def maybe_replace(task: Task, replace: bool) -> int: if replace: return task.replace(maybe_replace.s(replace=False)) # type: ignore[func-returns-value] else: return 10
[1] https://github.com/celery/celery/blob/1b35d1d5966614ce36af75808ee21b0d2db6745d/celery/app/task.py#L1105-L1109
Thank you!
Resolves #166
Task.replace()
eitherapply
s the provided signature eagerly, or raisesIgnore
[1]. Here's a silly example which this PR fixes:[1] https://github.com/celery/celery/blob/1b35d1d5966614ce36af75808ee21b0d2db6745d/celery/app/task.py#L1105-L1109