mirror of
https://github.com/tgbot-collection/ytdlbot.git
synced 2025-02-24 23:34:44 +08:00
change influxdb server
This commit is contained in:
parent
a8c4db9ee5
commit
7962d9db00
2 changed files with 10 additions and 3 deletions
|
@ -305,7 +305,16 @@ class MySQL:
|
|||
|
||||
class InfluxDB:
|
||||
def __init__(self):
|
||||
self.client = InfluxDBClient(host=os.getenv("INFLUX_HOST", "192.168.7.233"), database="celery")
|
||||
self.client = InfluxDBClient(
|
||||
host=os.getenv("INFLUX_HOST"),
|
||||
path=os.getenv("INFLUX_PATH"),
|
||||
port=443,
|
||||
username="nova",
|
||||
password=os.getenv("INFLUX_PASS"),
|
||||
database="celery",
|
||||
ssl=True,
|
||||
verify_ssl=True,
|
||||
)
|
||||
self.data = None
|
||||
|
||||
def __del__(self):
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
__author__ = "Benny <benny.think@gmail.com>"
|
||||
|
||||
import contextlib
|
||||
import gc
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
|
@ -576,7 +575,6 @@ if __name__ == "__main__":
|
|||
scheduler = BackgroundScheduler(timezone="Europe/London")
|
||||
scheduler.add_job(auto_restart, "interval", seconds=600)
|
||||
scheduler.add_job(clean_tempfile, "interval", seconds=120)
|
||||
scheduler.add_job(gc.collect, "interval", seconds=3600)
|
||||
if not IS_BACKUP_BOT:
|
||||
scheduler.add_job(Redis().reset_today, "cron", hour=0, minute=0)
|
||||
scheduler.add_job(InfluxDB().collect_data, "interval", seconds=120)
|
||||
|
|
Loading…
Reference in a new issue