Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Output useful example command when deploying or serving realtime…
… app (#689) Resolve BE-2020 Instead of `curl`, we will now output a command that uses `websocat`. We do this by checking for a `websocket` flag set on the parent. ```bash ~/Dev/be/baps/realtime main ❯ beta9 serve app.py:handler 28s beta9-py3.12 => Building image => Using cached image => Syncing files Reading .beta9ignore file Collecting files from /Users/minzi/Dev/beam/baps/realtime Added /Users/minzi/Dev/beam/baps/realtime/app.py Collected object is 405.00 B => Files already synced => Invocation details websocat 'ws://localhost:1994/asgi/id/ba11d9f7-7c2a-4396-8dd2-094f9c592301' \ -H 'Authorization: Bearer TOKEN' => Watching '/Users/minzi/Dev/beam/baps/realtime' for changes... [2024-11-04 20:21:01 +0000] [10] [INFO] Starting gunicorn 20.1.0 [2024-11-04 20:21:01 +0000] [10] [INFO] Listening at: http://[::]:37151 (10) [2024-11-04 20:21:01 +0000] [10] [INFO] Using worker: uvicorn.workers.UvicornWorker [2024-11-04 20:21:01 +0000] [11] [INFO] Booting worker with pid: 11 Running on_start func: app:load_model on_start func complete, took: 0.0005667209625244141s [2024-11-04 20:21:02 +0000] [11] [INFO] Started server process [11] [2024-11-04 20:21:02 +0000] [11] [INFO] Waiting for application startup. [2024-11-04 20:21:02 +0000] [11] [INFO] Application startup complete. Received task <504082a2-f47a-415c-8573-34ff4be3806b> [2024-11-04 20:21:13 +0000] [11] [INFO] ('::ffff:10.42.0.226', 58748) - "WebSocket /" [accepted] [2024-11-04 20:21:13 +0000] [11] [INFO] connection open my_model my_model Task <504082a2-f47a-415c-8573-34ff4be3806b> finished [2024-11-04 20:21:18 +0000] [11] [INFO] connection closed => Stopping serve container Goodbye 👋 ```
- Loading branch information