File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,20 @@ export class Watcher extends EventEmitter {
32
32
private interval : number ;
33
33
private watcher : FSWatcher ;
34
34
35
- constructor ( path : string , interval : number = 300 , debounce : number = 0 ) {
35
+ constructor ( path : string , interval : number = 300 , debounce : number = 0 ) {
36
36
super ( ) ;
37
37
this . path = path ;
38
38
this . interval = interval ;
39
39
40
40
L . debug ( `${ path } : interval=${ interval } , debounce=${ debounce } ` ) ;
41
41
this . watcher = watch ( this . path , {
42
- interval : this . interval , // only effective if we end up forced to use polling
42
+ interval : this . interval ,
43
+ // polling is critical for network mounted filesystems,
44
+ // and given architecture of cocalc there is no easy way around this.
45
+ // E.g., on compute servers, everything breaks involving sync or cloudfs,
46
+ // and in shared project s3/gcsfuse/sshfs would all break. So we
47
+ // use polling.
48
+ usePolling : true ,
43
49
persistent : false ,
44
50
alwaysStat : true ,
45
51
atomic : true ,
You can’t perform that action at this time.
0 commit comments