Skip to content

Commit

Permalink
chore(BUX-170): require Pulse config when using BEEF
Browse files Browse the repository at this point in the history
  • Loading branch information
pawellewandowski98 committed Oct 12, 2023
1 parent c4fae1e commit 9c04fa1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions config/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,12 @@ func (s *AppServices) loadBux(ctx context.Context, appConfig *AppConfig, testMod
}

if appConfig.UseBeef {
options = append(options, bux.WithPaymailBeefSupport())
}

if appConfig.Pulse != nil {
options = append(options, bux.WithPulse(appConfig.Pulse.PulseURL, appConfig.Pulse.PulseAuthToken))
if appConfig.Pulse == nil || appConfig.Pulse.PulseURL == "" || appConfig.Pulse.PulseAuthToken == "" {
err = errors.New("pulse is required for BEEF to work")
return
}
options = append(options, bux.WithPaymailBeefSupport(appConfig.Pulse.PulseURL, appConfig.Pulse.PulseAuthToken))
}

// Load task manager (redis or taskq)
Expand Down

0 comments on commit 9c04fa1

Please sign in to comment.