fix(playout): use new api-client v1

This commit is contained in:
jo 2023-03-21 14:16:29 +01:00 committed by Kyle Robbertze
parent 0ec2c7fd54
commit 114a599993
2 changed files with 10 additions and 4 deletions

View File

@ -38,8 +38,8 @@ for module in ("amqp",):
def wait_for_legacy(legacy_client: LegacyClient) -> None:
while not legacy_client.is_server_compatible():
time.sleep(5)
while legacy_client.version() == -1:
time.sleep(2)
success = False
while not success:
@ -104,7 +104,10 @@ def cli(
api_key=config.general.api_key,
)
legacy_client = LegacyClient()
legacy_client = LegacyClient(
base_url=config.general.public_url,
api_key=config.general.api_key,
)
wait_for_legacy(legacy_client)
liq_client = LiquidsoapClient(

View File

@ -34,7 +34,10 @@ class App:
def __init__(self, config: Config) -> None:
self.config = config
self.api_client = LegacyClient()
self.api_client = LegacyClient(
base_url=config.general.public_url,
api_key=config.general.api_key,
)
pass_app = click.make_pass_decorator(App)