bretth / django-pq

[UNMAINTAINED] A task queue based on the elegant python RQ but with a django postgresql backend.
BSD 2-Clause "Simplified" License
68 stars 7 forks source link

fixing / warning with sentry error-reporting? #16

Open syphar opened 10 years ago

syphar commented 10 years ago

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.

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.

syphar commented 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.

bretth commented 10 years ago

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.