I am using a worker script to start my worker. Sorry if I missed it in the documentation, but how can I integrate sentry from a worker script?
This is how I am setting up my workers
Previously with raven, I can do this.
from raven import Client from raven.transport.http import HTTPTransport from rq.contrib.sentry import register_sentry app = create_app() client = Client(app.config.get('SENTRY_DSN'), transport=HTTPTransport) listen = ['default'] if len(sys.argv) > 1: listen = [queue_name.strip() for queue_name in sys.argv[1:]] if __name__ == '__main__': with Connection(redis_conn): with app.app_context(): worker = Worker(map(Queue, listen)) register_sentry(client, worker) worker.work()
And running it like
python worker.py name_of_queue
Not sure where to integrate this