MCPcopy Create free account
hub / github.com/VitoHowe/glm-coding / _configure_worker_threads

Function _configure_worker_threads

app/services/ocr_service.py:41–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39def _load_adapter_module():
40 from app.services import tenvision_adapter
41
42 return tenvision_adapter
43
44
45def _worker_initializer() -> None:
46 _clear_proxy_env()
47 _load_adapter_module().get_engine()
48
49
50def _warmup_worker(index: int) -> dict[str, Any]:
51 _clear_proxy_env()
52 _load_adapter_module().get_engine()
53 time.sleep(0.1)
54 return {"index": index, "pid": os.getpid()}
55
56
57def _worker_analyze(data: bytes, prompt_text: str, include_debug: bool) -> dict[str, Any]:

Callers 3

_worker_initializerFunction · 0.85
_warmup_workerFunction · 0.85
_worker_analyzeFunction · 0.85

Calls 1

get_settingsFunction · 0.90

Tested by

no test coverage detected