Added newlines against buffering for log streaming. Fixed cli
Some checks failed
checks / test (pull_request) Failing after 1m25s
checks-impure / test (pull_request) Failing after 12s

This commit is contained in:
Luis Hebendanz 2023-10-03 14:38:51 +02:00
parent d25c3a0940
commit d8b69ec883
2 changed files with 3 additions and 3 deletions

View File

@ -37,8 +37,8 @@ def create(args: argparse.Namespace) -> None:
stream = asyncio.run(vms.get_vm_logs(uuid))
for line in read_stream_response(stream):
print(line)
print(line, end="")
print("")
def register_create_parser(parser: argparse.ArgumentParser) -> None:
parser.add_argument("machine", type=str)

View File

@ -164,7 +164,7 @@ async def get_vm_logs(uuid: UUID) -> StreamingResponse:
@router.post("/api/vms/create")
async def create_vm(
vm: Annotated[VmConfig, Body()], background_tasks: BackgroundTasks
vm: Annotated[VmConfig, Body()]
) -> VmCreateResponse:
flake_attrs = await get_attrs(vm.flake_url)
if vm.flake_attr not in flake_attrs: