Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use_reloader not working as intended #200

Open
Randark-JMT opened this issue Mar 2, 2024 · 3 comments
Open

use_reloader not working as intended #200

Randark-JMT opened this issue Mar 2, 2024 · 3 comments

Comments

@Randark-JMT
Copy link

Randark-JMT commented Mar 2, 2024

following is my code

# main.py
import asyncio
from hypercorn.config import Config
from hypercorn.asyncio import serve

from api.main import app

config = Config()
customConfig = {
    "bind": ["0.0.0.0:8080"],
    "use_reloader": True,
    "accesslog": "-",
    "errorlog": "-",
}

asyncio.run(serve(app, Config.from_mapping(customConfig)))

and api file

# api/main.py
from typing import Union
from fastapi import FastAPI
from api.manager.dockers import docker_manager

app = FastAPI()


@app.get("/")
def read_root():
    return {"Hello": "World"}

Expected Behavior

Application should reload when changes are made to the source code

Actual Behavior

API does not reload and changes do not appear on the running application

Steps to Reproduce the Problem

  1. Run the code
    python main.py
  2. Modify the code as the application is running

Version:

  • Python 3.11.6
  • Hypercorn 0.16.0
  • Ubuntu 23.10
@guzman109
Copy link

Can confirm that changes made during development are not being reloaded.

Using

  • Hypercorn 0.16.0
  • FastAPI 0.110.0
  • Uvloop 0.19.0

@pythonhubdev
Copy link

Any update on this it's same for me as well. No reload happens use_reloaded=True

@guzman109
Copy link

Nope and gave up on hypercorn. I'm using unicorn right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants