mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 07:10:19 +00:00
NOISSUE - Remove reports from the Nats handler
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
This commit is contained in:
@@ -35,25 +35,12 @@ func (re *re) Handle(msg *messaging.Message) error {
|
||||
return err
|
||||
}
|
||||
|
||||
reportConfigs, err := re.repo.ListReportsConfig(ctx, pm)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, r := range page.Rules {
|
||||
go func(ctx context.Context) {
|
||||
re.errors <- re.process(ctx, r, msg)
|
||||
}(ctx)
|
||||
}
|
||||
|
||||
for _, cfg := range reportConfigs.ReportConfigs {
|
||||
go func(ctx context.Context) {
|
||||
if err := re.processReportConfig(ctx, cfg); err != nil {
|
||||
re.errors <- err
|
||||
}
|
||||
}(ctx)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user