GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-python

Live reload for aio.http with --debug

Aperta
#397 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
enhancement P2
Lingua principale
Python
Stelle
968
Fork
128
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.