MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / _initialize_globals

Function _initialize_globals

api_utils/app.py:58–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56
57
58def _initialize_globals():
59 from api_utils.server_state import state
60
61 state.request_queue = Queue()
62 state.processing_lock = Lock()
63 state.model_switching_lock = Lock()
64 state.params_cache_lock = Lock()
65
66 # Initialize model_list_fetch_event
67 state.model_list_fetch_event = asyncio.Event()
68
69 auth_utils.initialize_keys()
70
71 # Initialize Auth Rotation Lock
72 from config.global_state import GlobalState
73
74 GlobalState.init_rotation_lock()
75
76 state.logger.info("API keys and global locks initialized.")
77
78
79def _initialize_proxy_settings():

Callers 2

test_initialize_globalsFunction · 0.90
lifespanFunction · 0.85

Calls 2

init_rotation_lockMethod · 0.80
infoMethod · 0.80

Tested by 1

test_initialize_globalsFunction · 0.72