mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 09:48:20 +08:00
Refactor: Atomic file read/write for better performance
- Drop dependency atomicwrites
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
import sys
|
||||
import json
|
||||
import time
|
||||
import queue
|
||||
import argparse
|
||||
import json
|
||||
import queue
|
||||
import threading
|
||||
|
||||
import time
|
||||
from datetime import datetime
|
||||
from functools import partial
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
# Import fake module before import pywebio to avoid importing unnecessary module PIL
|
||||
from module.webui.fake_pil_module import import_fake_pil_module
|
||||
|
||||
import_fake_pil_module()
|
||||
|
||||
from pywebio import config as webconfig
|
||||
@@ -1440,6 +1439,9 @@ def app():
|
||||
logger.attr("CDN", cdn)
|
||||
logger.attr("IS_ON_PHONE_CLOUD", IS_ON_PHONE_CLOUD)
|
||||
|
||||
from deploy.atomic import atomic_failure_cleanup
|
||||
atomic_failure_cleanup('./config')
|
||||
|
||||
def index():
|
||||
if key is not None and not login(key):
|
||||
logger.warning(f"{info.user_ip} login failed.")
|
||||
|
||||
Reference in New Issue
Block a user