mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-14 17:03:29 +03:00
feat(sentry): added on celery
This commit is contained in:
parent
828b39a77a
commit
5619f2e602
@ -2,6 +2,7 @@ import asyncio
|
||||
import io
|
||||
import os
|
||||
|
||||
import sentry_sdk
|
||||
from celery import Celery
|
||||
from celery.schedules import crontab
|
||||
from fastapi import UploadFile
|
||||
@ -16,6 +17,14 @@ from packages.files.crawl.crawler import CrawlWebsite
|
||||
from packages.files.parsers.github import process_github
|
||||
from packages.files.processors import filter_file
|
||||
|
||||
sentry_dsn = os.getenv("SENTRY_DSN")
|
||||
if sentry_dsn:
|
||||
sentry_sdk.init(
|
||||
dsn=sentry_dsn,
|
||||
sample_rate=0.1,
|
||||
enable_tracing=True,
|
||||
)
|
||||
|
||||
CELERY_BROKER_URL = os.getenv("CELERY_BROKER_URL", "")
|
||||
CELERY_BROKER_QUEUE_NAME = os.getenv("CELERY_BROKER_QUEUE_NAME", "quivr")
|
||||
|
||||
|
@ -71,7 +71,7 @@ services:
|
||||
- .env
|
||||
build:
|
||||
context: backend
|
||||
dockerfile: Dockerfile.dev
|
||||
dockerfile: Dockerfile
|
||||
container_name: worker
|
||||
command: celery -A celery_worker worker -l info
|
||||
restart: always
|
||||
@ -86,7 +86,7 @@ services:
|
||||
- .env
|
||||
build:
|
||||
context: backend
|
||||
dockerfile: Dockerfile.dev
|
||||
dockerfile: Dockerfile
|
||||
container_name: beat
|
||||
command: celery -A celery_worker beat -l info
|
||||
restart: always
|
||||
@ -100,7 +100,7 @@ services:
|
||||
- .env
|
||||
build:
|
||||
context: backend
|
||||
dockerfile: Dockerfile.dev
|
||||
dockerfile: Dockerfile
|
||||
container_name: flower
|
||||
command: celery -A celery_worker flower -l info --port=5555
|
||||
restart: always
|
||||
|
Loading…
Reference in New Issue
Block a user