GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-python

Live reload for aio.http with --debug

Đang mở
#397 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement P2
Ngôn ngữ chính
Python
Star
968
Fork
128
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.