mirror of
https://github.com/tgbot-collection/YYeTsBot.git
synced 2025-11-25 11:29:38 +08:00
update dependencies, enhance dump backup
This commit is contained in:
@@ -11,7 +11,6 @@ import logging
|
||||
import os
|
||||
import pathlib
|
||||
import platform
|
||||
import threading
|
||||
|
||||
import pytz
|
||||
import tornado.autoreload
|
||||
@@ -21,6 +20,7 @@ from tornado import httpserver, ioloop, options, web
|
||||
from tornado.log import enable_pretty_logging
|
||||
|
||||
import dump_db
|
||||
from Mongo import OtherMongoResource, ResourceLatestMongoResource
|
||||
from handler import (AnnouncementHandler, BlacklistHandler, CaptchaHandler,
|
||||
CategoryHandler, CommentChildHandler, CommentHandler,
|
||||
CommentNewestHandler, CommentReactionHandler,
|
||||
@@ -32,7 +32,6 @@ from handler import (AnnouncementHandler, BlacklistHandler, CaptchaHandler,
|
||||
ResourceLatestHandler, SpamProcessHandler, TopHandler,
|
||||
UserEmailHandler, UserHandler)
|
||||
from migration.douban_sync import sync_douban
|
||||
from Mongo import OtherMongoResource, ResourceLatestMongoResource
|
||||
from utils import Cloudflare
|
||||
|
||||
enable_pretty_logging()
|
||||
@@ -110,8 +109,6 @@ if __name__ == "__main__":
|
||||
scheduler.add_job(OtherMongoResource().import_ban_user, 'interval', seconds=300)
|
||||
scheduler.add_job(cf.clear_fw, trigger=CronTrigger.from_crontab("0 0 */5 * *"))
|
||||
scheduler.start()
|
||||
logging.info("Triggering dump database now...")
|
||||
threading.Thread(target=dump_db.no_error_entry_dump).start()
|
||||
|
||||
options.define("p", default=8888, help="running port", type=int)
|
||||
options.define("h", default='127.0.0.1', help="listen address", type=str)
|
||||
|
||||
Reference in New Issue
Block a user