update dependencies, enhance dump backup

This commit is contained in:
Benny
2022-12-30 18:58:23 +01:00
parent f67d41b5d6
commit 293fcfc922
3 changed files with 16 additions and 19 deletions

View File

@@ -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)