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

Method reset_quota_status

config/global_state.py:145–159  ·  view source on GitHub ↗

Resets the global quota exceeded flag.

(cls)

Source from the content-addressed store, hash-verified

143
144 @classmethod
145 def reset_quota_status(cls):
146 """
147 Resets the global quota exceeded flag.
148 """
149 cls.IS_QUOTA_EXCEEDED = False
150 cls.NEEDS_ROTATION = False # Reset soft flag too
151 cls.QUOTA_EXCEEDED_TIMESTAMP = 0.0
152 cls.last_error_type = None
153 cls.QUOTA_EXCEEDED_EVENT.clear()
154
155 # [QUOTA-02] Reset model usage stats
156 cls.current_profile_model_usage.clear()
157 cls.current_profile_exhausted_models.clear()
158
159 logger.info("✅ GLOBAL ALERT: Quota status manually reset.")
160
161 @classmethod
162 def increment_token_count(cls, count: int, model_id: str = "default"):

Callers 15

quota_watchdogFunction · 0.80
perform_auth_rotationFunction · 0.80
setUpMethod · 0.80
setUpMethod · 0.80
tearDownMethod · 0.80
asyncSetUpMethod · 0.80
setup_teardownFunction · 0.80
reset_global_stateFunction · 0.80
test_timeout_boundsMethod · 0.80

Calls 2

infoMethod · 0.80
clearMethod · 0.45

Tested by 15

setUpMethod · 0.64
setUpMethod · 0.64
tearDownMethod · 0.64
asyncSetUpMethod · 0.64
setup_teardownFunction · 0.64
reset_global_stateFunction · 0.64
test_timeout_boundsMethod · 0.64
run_testMethod · 0.64
setUpMethod · 0.64