mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Lift process.env access to module scope.
https://github.com/meteor/meteor/pull/9911#pullrequestreview-123587003
This commit is contained in:
@@ -11,6 +11,9 @@ import {
|
||||
optimisticHashOrNull,
|
||||
} from "./optimistic.js";
|
||||
|
||||
const WATCH_COALESCE_MS =
|
||||
process.env.METEOR_FILE_WATCH_COALESCE_MS || 100;
|
||||
|
||||
// Watch for changes to a set of files, and the first time that any of
|
||||
// the files change, call a user-provided callback. (If you want a
|
||||
// second callback, you'll need to create a second Watcher.)
|
||||
@@ -501,8 +504,7 @@ export class Watcher {
|
||||
// additional calls if they happen within that window of time, so that
|
||||
// a rapid succession of calls will tend to trigger only one inspection
|
||||
// of the file system.
|
||||
const coalesceMs = process.env.METEOR_FILE_WATCH_COALESCE_MS || 100;
|
||||
return coalesce(coalesceMs, function onWatchEvent() {
|
||||
return coalesce(WATCH_COALESCE_MS, function onWatchEvent() {
|
||||
if (self.stopped) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user