INNER CODE UNIT · Python
_one
roboflow/inference · inference_server/inference_server/app.py:148
async def _one(mid, api_key, is_pinned):
started = time.monotonic()
deadline = started + _PINNED_PRELOAD_MAX_WAIT_S if is_pinned else None
while not await _load_once(mid, api_key, is_pinned, deadline):
if not is_pinned:
return
remaining = deadline - time.monotonic()
if remaining <= _PINNED_PRELOAD_RETRY_S:
logger.error(
"Preload of '%s' gave up after %.0f s; serving without it",
mid,
time.monotonic() - started,
)
return
await asyncio.sleep(_PINNED_PRELOAD_RETRY_S)
try:
await asyncio.gather(