fix(playout): use new api-client v1
This commit is contained in:
parent
0ec2c7fd54
commit
114a599993
|
@ -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(
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue