Skip to content

Commit

Permalink
Add WatchFilesReload pause method (encode#1930)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee authored Apr 22, 2023
1 parent 7caaf20 commit 8738727
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions uvicorn/supervisors/watchfilesreload.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def __init__(
)

def should_restart(self) -> Optional[List[Path]]:
self.pause()

changes = next(self.watcher)
if changes:
unique_paths = {Path(c[1]) for c in changes}
Expand Down

0 comments on commit 8738727

Please sign in to comment.