Skip to content

Commit

Permalink
[service] Do not warn when custom filter lists are not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaavi committed Aug 23, 2024
1 parent 7df0fbb commit b6b0729
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions service/intel/customlists/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ func start() error {
module.instance.Config().EventConfigChange.AddCallback(
"update custom filter list",
func(wc *mgr.WorkerCtx, _ struct{}) (bool, error) {
if err := checkAndUpdateFilterList(wc); !errors.Is(err, ErrNotConfigured) {
err := checkAndUpdateFilterList(wc)
if !errors.Is(err, ErrNotConfigured) {
return false, err
}
return false, nil
Expand Down Expand Up @@ -224,8 +225,18 @@ func New(instance instance) (*CustomList, error) {
mgr: m,
instance: instance,

states: mgr.NewStateMgr(m),
updateFilterListWorkerMgr: m.NewWorkerMgr("update custom filter list", checkAndUpdateFilterList, nil),
states: mgr.NewStateMgr(m),
updateFilterListWorkerMgr: m.NewWorkerMgr(
"update custom filter list",
func(ctx *mgr.WorkerCtx) error {
err := checkAndUpdateFilterList(ctx)
if !errors.Is(err, ErrNotConfigured) {
return err
}
return nil
},
nil,
),
}

if err := prep(); err != nil {
Expand Down

0 comments on commit b6b0729

Please sign in to comment.