GunicornCelery

Long-running tasks should be offloaded to background workers

info
availabilityUpdated Mar 1, 2026(via Exa)
How to detect:

Tasks that risk exceeding 25 seconds on platforms with 30-second timeouts (like Heroku H12) should not be handled in web request handlers. Keeping them in the synchronous request path leads to H12 timeout errors and poor user experience.

Recommended action:

Move any task that risks exceeding 25 seconds to a background worker like Celery. Return 202 Accepted status immediately to the client, avoiding the platform-level timeout entirely. This architectural pattern separates request acceptance from processing completion.