mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 23:42:07 +01:00
This change initializes the Sentry SDK, which enables error tracking when the `SENTRY_DSN` environment variable is set. Drop-in alternatives to Sentry are also supported, like GlitchTip.
20 lines
433 B
Python
20 lines
433 B
Python
import sentry_sdk
|
|
from config import SENTRY_DSN
|
|
from handler.redis_handler import redis_client
|
|
from rq import Connection, Queue, Worker
|
|
from utils import get_version
|
|
|
|
listen = ["high", "default", "low"]
|
|
|
|
sentry_sdk.init(
|
|
dsn=SENTRY_DSN,
|
|
release="romm@" + get_version(),
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
# Start the worker
|
|
with Connection(redis_client):
|
|
worker = Worker(map(Queue, listen))
|
|
worker.work()
|