Skip to content

Commit

Permalink
fix(mailman): check if rule is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsNotGoodName committed Oct 27, 2023
1 parent 0ad787a commit af3db77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/mailman/mailman.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ func (m Mailman) send(ctx context.Context, tracer trace.Tracer, env models.Envel
for _, r := range rules {
tracer := tracer.Sticky(trace.WithRule(r.Rule.ID))

if !r.Rule.Enable {
tracer.Trace(ctx, "mailman.rule.skip(disabled)")
continue
}

if len(r.Endpoints) == 0 {
tracer.Trace(ctx, "mailman.rule.endpoints.skip(empty)")
continue
Expand Down

0 comments on commit af3db77

Please sign in to comment.