17 lines
463 B
Python
17 lines
463 B
Python
"""Раз в час: пора ли сменить мастера (ночь, возраст, размер контекста)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import logging
|
|
from typing import TYPE_CHECKING
|
|
|
|
if TYPE_CHECKING:
|
|
from beaver_gateway.jobs.scheduler import JobRun
|
|
|
|
_log = logging.getLogger(__name__)
|
|
|
|
|
|
async def rotate(run: JobRun) -> None:
|
|
for master in await run.rotate():
|
|
_log.info("rotated master -> %s", master.external_id)
|