bottlepy / bottle

bottle.py is a fast and simple micro-framework for python web-applications.
http://bottlepy.org/
MIT License
8.4k stars 1.46k forks source link

reload not working with bjoern #1270

Closed cgloeckner closed 1 month ago

cgloeckner commented 3 years ago

Hi,

I don't know whether it's a bug in bjoern but reloader=True seems not to work with bjoern.

Example code:

from bottle import route, run

@route('/')
def test():
    return()

run(reloader=True, server='bjoern')

I also don't know "what" to report to jonashaag/bjoern in order to fix that.

Greetings, glocke

Jwink3101 commented 3 years ago

I am not sure what this issue is but I would strongly recommend not using reload in production and only testing other adapters for production.

defnull commented 1 month ago

I only test the reload feature with the built-in development server. It should work with other servers, as long as they shutdown properly when some thread calls thread.interrupt_main(). If this does not work, then bjoern probably ignores KeyboardInterrupt exceptions in its main thread, which would be a bug in bjoern. File an issue there and maybe they can figure something out.