From ebf47dbb0c4a2b117306fa61163827ad20c10765 Mon Sep 17 00:00:00 2001 From: kun Date: Tue, 15 Oct 2024 15:17:43 +0000 Subject: [PATCH] chore: replace ctx with context.Background() --- internal/sbi/processor/nf_management.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/internal/sbi/processor/nf_management.go b/internal/sbi/processor/nf_management.go index 5f3dba0..4c37c6c 100644 --- a/internal/sbi/processor/nf_management.go +++ b/internal/sbi/processor/nf_management.go @@ -362,10 +362,8 @@ func (p *Processor) UpdateNFInstanceProcedure(nfInstanceID string, patchJSON []b Notification_event := models.NotificationEventType_PROFILE_CHANGED nfInstanceUri := nrf_context.GetNfInstanceURI(nfInstanceID) - ctx := context.Background() - for _, uri := range uriList { - p.Consumer().SendNFStatusNotify(ctx, Notification_event, nfInstanceUri, uri, &nfProfiles[0]) + p.Consumer().SendNFStatusNotify(context.Background(), Notification_event, nfInstanceUri, uri, &nfProfiles[0]) } return nf } @@ -486,10 +484,9 @@ func (p *Processor) NFRegisterProcedure( // Add NF Register Conter p.Context().AddNfRegister() - ctx := context.Background() - for _, uri := range uriList { - problemDetails := p.Consumer().SendNFStatusNotify(ctx, Notification_event, nfInstanceUri, uri, nfProfile) + problemDetails := p.Consumer().SendNFStatusNotify(context.Background(), + Notification_event, nfInstanceUri, uri, nfProfile) if problemDetails != nil { util.GinProblemJson(c, problemDetails) return