fix: address code review findings
This commit is contained in:
@@ -80,7 +80,7 @@ func TestDataFlowSmoke(t *testing.T) {
|
||||
}}
|
||||
tgCfg := config.TelegramConfig{Enabled: true}
|
||||
|
||||
n1, err := notifier.NotifyOnce(ctx, db, stub, tgCfg, "http://localhost:8080")
|
||||
n1, err := notifier.NotifyOnce(ctx, db, stub, tgCfg, "http://localhost:8080", 0.85)
|
||||
if err != nil {
|
||||
t.Fatalf("NotifyOnce #1: %v", err)
|
||||
}
|
||||
@@ -91,7 +91,7 @@ func TestDataFlowSmoke(t *testing.T) {
|
||||
t.Fatalf("digest missing expected content: %v", sent)
|
||||
}
|
||||
|
||||
n2, err := notifier.NotifyOnce(ctx, db, stub, tgCfg, "http://localhost:8080")
|
||||
n2, err := notifier.NotifyOnce(ctx, db, stub, tgCfg, "http://localhost:8080", 0.85)
|
||||
if err != nil {
|
||||
t.Fatalf("NotifyOnce #2: %v", err)
|
||||
}
|
||||
|
||||
@@ -214,9 +214,9 @@ func (a *App) startNotifier(ctx context.Context) {
|
||||
log.Printf("Notifier schedule invalid (%q): %v; notifier disabled", a.cfg.Telegram.CronSchedule, err)
|
||||
return
|
||||
}
|
||||
uiBaseURL := a.cfg.Server.PublicURL
|
||||
uiBaseURL := web.ResolveUIBaseURL(&a.cfg.Server)
|
||||
notifier.StartScheduler(ctx, true, schedule, func(ctx context.Context) error {
|
||||
_, err := notifier.NotifyOnce(ctx, a.db, a.sender, a.cfg.Telegram, uiBaseURL)
|
||||
_, err := notifier.NotifyOnce(ctx, a.db, a.sender, a.cfg.Telegram, uiBaseURL, a.cfg.Scanner.FuzzyThreshold)
|
||||
return err
|
||||
}, nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user