feat(playout): use single clients instance (#1980)
- Use legacy_client across playout code to make the difference between the old and new clients. - Setup clients during initialization, and pass clients down to the different apps.
This commit is contained in:
parent
f03605a6ce
commit
368350b269
9 changed files with 49 additions and 43 deletions
|
@ -16,7 +16,7 @@ from pathlib import Path
|
|||
from typing import Optional
|
||||
|
||||
import click
|
||||
from libretime_api_client.v1 import ApiClient
|
||||
from libretime_api_client.v1 import ApiClient as LegacyClient
|
||||
from libretime_shared.cli import cli_logging_options
|
||||
from libretime_shared.config import DEFAULT_ENV_PREFIX
|
||||
from libretime_shared.logging import level_from_name, setup_logger
|
||||
|
@ -24,7 +24,7 @@ from loguru import logger
|
|||
|
||||
|
||||
def api_client():
|
||||
return ApiClient(logger=logger)
|
||||
return LegacyClient(logger=logger)
|
||||
|
||||
|
||||
@click.group(context_settings={"auto_envvar_prefix": DEFAULT_ENV_PREFIX})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue