remove sentry

This commit is contained in:
Benny 2023-08-15 20:43:09 +02:00
parent 02341a9865
commit 0b6efaae73
No known key found for this signature in database
GPG key ID: 6CD0DBDA5235D481
4 changed files with 2 additions and 17 deletions

View file

@ -22,4 +22,3 @@ ffpb==0.4.1
youtube-search-python==1.6.6
token-bucket==0.3.0
coloredlogs==15.0.1
sentry-sdk==1.29.2

View file

@ -63,5 +63,4 @@ TOKEN_PRICE = os.getenv("BUY_UNIT", 20) # one USD=20 credits
RATE_LIMIT = os.getenv("RATE_LIMIT", 20)
DSN = os.getenv("DSN")
SS_YOUTUBE = os.getenv("SS_YOUTUBE", "https://ytdlbot.dmesg.app?token=123456")

View file

@ -26,21 +26,18 @@ import filetype
import psutil
import pyrogram.errors
import requests
import sentry_sdk
from apscheduler.schedulers.background import BackgroundScheduler
from celery import Celery
from celery.worker.control import Panel
from pyrogram import Client, idle, types
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message
from requests_toolbelt import MultipartEncoder, MultipartEncoderMonitor
from sentry_sdk.integrations.celery import CeleryIntegration
from channel import Channel
from client_init import create_app
from config import (
ARCHIVE_ID,
BROKER,
DSN,
ENABLE_CELERY,
ENABLE_QUEUE,
ENABLE_VIP,
@ -74,8 +71,6 @@ channel = Channel()
session = "ytdl-celery"
celery_client = create_app(session)
if DSN:
sentry_sdk.init(DSN, integrations=[CeleryIntegration()])
def get_messages(chat_id, message_id):

View file

@ -20,7 +20,6 @@ from io import BytesIO
import pyrogram.errors
import requests
import sentry_sdk
import yt_dlp
from apscheduler.schedulers.background import BackgroundScheduler
from pyrogram import Client, filters, types
@ -34,7 +33,6 @@ from channel import Channel
from client_init import create_app
from config import (
AUTHORIZED_USER,
DSN,
ENABLE_CELERY,
ENABLE_FFMPEG,
ENABLE_VIP,
@ -66,8 +64,6 @@ app = create_app(session)
logging.info("Authorized users are %s", AUTHORIZED_USER)
redis = Redis()
channel = Channel()
if DSN:
sentry_sdk.init(dsn=DSN)
def private_use(func):
@ -355,12 +351,8 @@ def link_checker(url: str) -> str:
return ""
ytdl = yt_dlp.YoutubeDL()
if (
not PLAYLIST_SUPPORT
and (
re.findall(r"^https://www\.youtube\.com/channel/", Channel.extract_canonical_link(url))
or "list" in url
)
if not PLAYLIST_SUPPORT and (
re.findall(r"^https://www\.youtube\.com/channel/", Channel.extract_canonical_link(url)) or "list" in url
):
return "Playlist or channel links are disabled."