mirror of
https://github.com/tgbot-collection/YYeTsBot.git
synced 2025-11-25 03:15:05 +08:00
update cf rules
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
requests==2.28.2
|
||||
pytelegrambotapi==4.10.0
|
||||
beautifulsoup4==4.11.2
|
||||
beautifulsoup4==4.12.0
|
||||
tgbot-ping==1.0.7
|
||||
redis==4.5.1
|
||||
redis==4.5.3
|
||||
apscheduler==3.10.1
|
||||
pymongo==4.3.3
|
||||
tornado==6.2
|
||||
captcha==0.4
|
||||
passlib==1.7.4
|
||||
fakeredis==2.10.1
|
||||
fakeredis==2.10.2
|
||||
filetype==1.2.0
|
||||
requests[socks]
|
||||
tqdm==4.65.0
|
||||
|
||||
@@ -139,7 +139,7 @@ class Cloudflare(Redis):
|
||||
if not self.r.exists(self.expire):
|
||||
resp = self.session.put(self.endpoint, json=body)
|
||||
logging.info(resp.json())
|
||||
self.r.set(self.expire, 1, ex=60)
|
||||
self.r.set(self.expire, 1, ex=120)
|
||||
|
||||
def clear_fw(self):
|
||||
logging.info("Clearing firewall rules")
|
||||
|
||||
@@ -160,7 +160,7 @@ if __name__ == "__main__":
|
||||
scheduler.add_job(sync_douban, trigger=CronTrigger.from_crontab("1 1 1 * *"))
|
||||
scheduler.add_job(entry_dump, trigger=CronTrigger.from_crontab("2 2 1 * *"))
|
||||
scheduler.add_job(Other().import_ban_user, "interval", seconds=300)
|
||||
scheduler.add_job(Cloudflare().clear_fw, trigger=CronTrigger.from_crontab("0 0 * * 1"))
|
||||
scheduler.add_job(Cloudflare().clear_fw, trigger=CronTrigger.from_crontab("0 0 */3 * *"))
|
||||
scheduler.add_job(YYSub().run, trigger=CronTrigger.from_crontab("0 1 * * *"))
|
||||
|
||||
scheduler.start()
|
||||
|
||||
Reference in New Issue
Block a user