Skip to content

Commit

Permalink
Switch the ScanDebounceDelay option to a time.Time
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Aug 9, 2024
1 parent a4ca625 commit 99645d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pkg/storage/fs/posix/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
package options

import (
"time"

decomposedoptions "github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/options"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
Expand All @@ -29,7 +31,7 @@ type Options struct {

UseSpaceGroups bool `mapstructure:"use_space_groups"`

ScanDebounceDelay int `mapstructure:"scan_debounce_delay"`
ScanDebounceDelay time.Duration `mapstructure:"scan_debounce_delay"`

WatchFS bool `mapstructure:"watch_fs"`
WatchType string `mapstructure:"watch_type"`
Expand Down
3 changes: 1 addition & 2 deletions pkg/storage/fs/posix/tree/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"path/filepath"
"regexp"
"strings"
"time"

"github.com/google/uuid"
"github.com/pkg/errors"
Expand Down Expand Up @@ -114,7 +113,7 @@ func New(lu node.PathLookup, bs Blobstore, um usermapper.Mapper, trashbin *trash
idCache: cache,
propagator: propagator.New(lu, &o.Options),
scanQueue: scanQueue,
scanDebouncer: NewScanDebouncer(time.Duration(o.ScanDebounceDelay)*time.Millisecond, func(item scanItem) {
scanDebouncer: NewScanDebouncer(o.ScanDebounceDelay, func(item scanItem) {
scanQueue <- item
}),
es: es,
Expand Down

0 comments on commit 99645d2

Please sign in to comment.