Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion internal/health/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,15 @@ func (hc *HealthChecker) notifyRcloneVFS(filePath string, event HealthEvent) {
return // No rclone client configured
}

// Only notify for rclone-based mounts; FUSE and none don't use rclone VFS
cfg := hc.configGetter()
switch cfg.MountType {
case config.MountTypeRClone, config.MountTypeRCloneExternal:
// continue
default:
return
}

// Only notify on significant status changes (healthy <-> corrupted)
switch event.Type {
case EventTypeFileHealthy, EventTypeFileCorrupted:
Expand All @@ -229,7 +238,6 @@ func (hc *HealthChecker) notifyRcloneVFS(filePath string, event HealthEvent) {
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
defer cancel()

cfg := hc.configGetter()
vfsName := cfg.RClone.VFSName
if vfsName == "" {
vfsName = config.MountProvider
Expand Down
16 changes: 16 additions & 0 deletions internal/importer/postprocessor/vfs_notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ func (c *Coordinator) NotifyVFS(ctx context.Context, resultingPath string, async
return
}

// Only notify for rclone-based mounts; FUSE and none don't use rclone VFS
switch c.configGetter().MountType {
case config.MountTypeRClone, config.MountTypeRCloneExternal:
// continue
default:
return
}

refreshFunc := func(path string) {
refreshCtx, cancel := context.WithTimeout(ctx, 60*time.Second)
defer cancel()
Expand Down Expand Up @@ -74,6 +82,14 @@ func (c *Coordinator) RefreshMountPathIfNeeded(ctx context.Context, resultingPat
return
}

// Only notify for rclone-based mounts; FUSE and none don't use rclone VFS
switch c.configGetter().MountType {
case config.MountTypeRClone, config.MountTypeRCloneExternal:
// continue
default:
return
}

cfg := c.configGetter()
mountPath := filepath.Join(cfg.MountPath, filepath.Dir(strings.TrimPrefix(resultingPath, "/")))

Expand Down
Loading