MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / get_instance

Method get_instance

src/services/browser_captcha.py:2602–2610  ·  view source on GitHub ↗
(cls, db=None)

Source from the content-addressed store, hash-verified

2600
2601 @classmethod
2602 async def get_instance(cls, db=None) -> 'BrowserCaptchaService':
2603 if cls._instance is None:
2604 async with cls._lock:
2605 if cls._instance is None:
2606 cls._instance = cls(db)
2607 # 从数据库加载 browser_count 配置
2608 await cls._instance._load_browser_count()
2609 await cls._instance._ensure_idle_reaper()
2610 return cls._instance
2611
2612 def _check_available(self):
2613 """检查服务是否可用"""

Callers 13

lifespanFunction · 0.45
upload_imageMethod · 0.45
_get_recaptcha_tokenMethod · 0.45
delete_tokenMethod · 0.45
_try_refresh_stMethod · 0.45
_prepare_captcha_runtimeFunction · 0.45

Calls 2

_load_browser_countMethod · 0.80
_ensure_idle_reaperMethod · 0.80

Tested by 1

test_captcha_scoreFunction · 0.36