Open syphar opened 10 years ago
any idea on this? In reality, sentry integration is broken for many configurations atm.
I'll be happy to provide a PR if it's clear which solution to follow.
I haven't had a chance to fix this, but a quick review suggests to me that changing the way pqworker loads sentry is the best course of action. Instead of using the SENTRY_DSN the pqworker management command should use a new setting PQ_SENTRY_DSN, and contrib.sentry should provide warnings or exception if a threaded transport is used. The rational for sentry to switch to async methods makes sense for the request/response cycle but has no real benefit for background tasks anyway.
I just stumbled on a small problem (in my config?) question is if we should fix this in django-pq, or at least document the behavior.
https
http
orhttps
scheme is default.pqworker
forks a process to do the job-workWorker
class kills the forked process when the work is done.So the result is, failed jobs are not sent to sentry.
What should be the best solution to fix this?
edit: changed raven-version where this appeared.