Skip to content

[Bug]: Apps reload multiple times on save when --reload is used #1995

@wch

Description

@wch

Component

Other

Severity

P3 - Low (minor inconvenience)

Shiny Version

1.4.0

Python Version

3.12

Minimal Reproducible Example

...

Behavior

When I'm working on an app.py file and running it with shiny --reload, saving the file causes shiny to restart two times.

Here's some example output from a single save:

WARNING:  WatchFiles detected changes in 'examples/event/app.py'. Reloading...
INFO:     Shutting down
INFO:     connection closed
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [39459]
INFO:     Started server process [40731]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     127.0.0.1:58860 - "GET /?_positronRender%3D5 HTTP/1.1" 200 OK
INFO:     ('127.0.0.1', 58863) - "WebSocket /websocket/" [accepted]
INFO:     connection open
WARNING:  WatchFiles detected changes in 'examples/event/app.py'. Reloading...
INFO:     Shutting down
INFO:     connection closed
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [40731]
INFO:     Started server process [40733]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     127.0.0.1:58870 - "GET /?_positronRender%3D5 HTTP/1.1" 200 OK
INFO:     ('127.0.0.1', 58873) - "WebSocket /websocket/" [accepted]
INFO:     connection open

Error Messages (if any)

Environment

Mac

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions