GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-python

Live reload for aio.http with --debug

未關閉
#397 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement P2
主要語言
Python
星號
968
分支
128
PR 合併指標
30 天內沒有已合併 PR

描述

1.
```main.py
import functions_framework.aio
from starlette.requests import Request
from starlette.responses import Response
@functions_framework.aio.http
async def main(request: Request) -> Response:
print("Hello world")
return Response(status_code=200)
```
2. run functions-framework --target=main --debug
3. Edit `print("Hello world")` -> `print("I've updated")`

Expected: Should reload the application
Result: Does nothing

Seems like StarletteApplication probably needs something like `self.options.reload = debug`?

CC @taeold

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。