-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eagerly compute SHA's for watched files (#2861)
### Motivation This PR fixes two issues related to automated restarts. The first one is preventing undesired restarts immediately after the server finishes booting. The second one is preventing unwanted restarts if a create event is fired for an existing file. In theory, this shouldn't happen, but our tests tell a different story and we consistently see a create event getting fired for updates. ### Implementation The two fixes are: 1. Unified all of our watchers to only check the top level configuration files and then started eagerly computing the SHAs for all of them (if they are present). This will prevent unwanted restarts if these files are touched immediately after boot 2. Started using the hash check for `didCreate` as well. If the file being updated fires a create event and the content SHA matches ### Automated Tests Added a new test and reduced some of the sleeps on the other test, which is taking a bit too long.
- Loading branch information
Showing
2 changed files
with
96 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters