Skip to content

Commit

Permalink
Revert "add some debug symbols"
Browse files Browse the repository at this point in the history
This reverts commit 6c37e82.
  • Loading branch information
BennyThink committed Dec 30, 2023
1 parent 882b313 commit 0ef589f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ mnemonic==0.20
qrcode==7.4.2
blinker==1.7.0
flask===3.0.0
objgraph==3.6.0
pympler==1.0.1
12 changes: 0 additions & 12 deletions ytdlbot/ytdl_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
from io import BytesIO
from typing import Any

import objgraph
import pyrogram.errors
import qrcode
import yt_dlp
from apscheduler.schedulers.background import BackgroundScheduler
from pympler import tracker
from pyrogram import Client, enums, filters, types
from pyrogram.errors.exceptions.bad_request_400 import UserNotParticipant
from pyrogram.raw import functions
Expand Down Expand Up @@ -571,17 +569,8 @@ def trx_notify(_, **kwargs):
app.send_message(user_id, text)


def track_memory():
print("\n\nobjgraph result:")
objgraph.show_growth()
objgraph.show_most_common_types()
print("\n\npympler result:")
tr.print_diff()


if __name__ == "__main__":
MySQL()
tr = tracker.SummaryTracker()
TRX_SIGNAL.connect(trx_notify)
scheduler = BackgroundScheduler(timezone="Europe/London", job_defaults={"max_instances": 6})
scheduler.add_job(auto_restart, "interval", seconds=600)
Expand All @@ -590,7 +579,6 @@ def track_memory():
scheduler.add_job(Redis().reset_today, "cron", hour=0, minute=0)
scheduler.add_job(InfluxDB().collect_data, "interval", seconds=120)
scheduler.add_job(TronTrx().check_payment, "interval", seconds=60, max_instances=1)
scheduler.add_job(track_memory, "interval", seconds=120, max_instances=1)
# default quota allocation of 10,000 units per day
scheduler.add_job(periodic_sub_check, "interval", seconds=3600)
scheduler.start()
Expand Down

0 comments on commit 0ef589f

Please sign in to comment.