@@ -808,12 +808,14 @@ func CreateOrgNotification(ctx context.Context, title, description, referenceUrl
808808 if mainNotification .Ignored {
809809 log .Printf ("[INFO] Ignored notification %s for %s" , mainNotification .Title , mainNotification .UserId )
810810 } else {
811- err = sendToNotificationWorkflow (ctx , mainNotification , selectedApikey , org .Defaults .NotificationWorkflow , false , * authOrg )
812- if err != nil {
813- if ! strings .Contains (err .Error (), "cache stored" ) && ! strings .Contains (err .Error (), "Same workflow" ) {
814- log .Printf ("[ERROR] Failed sending notification to workflowId %s for reference %s (2): %s" , org .Defaults .NotificationWorkflow , mainNotification .Id , err )
811+ go func () {
812+ err = sendToNotificationWorkflow (ctx , mainNotification , selectedApikey , org .Defaults .NotificationWorkflow , false , * authOrg )
813+ if err != nil {
814+ if ! strings .Contains (err .Error (), "cache stored" ) && ! strings .Contains (err .Error (), "Same workflow" ) {
815+ log .Printf ("[ERROR] Failed sending notification to workflowId %s for reference %s (2): %s" , org .Defaults .NotificationWorkflow , mainNotification .Id , err )
816+ }
815817 }
816- }
818+ }()
817819 }
818820
819821 return nil
@@ -910,10 +912,12 @@ func CreateOrgNotification(ctx context.Context, title, description, referenceUrl
910912 }
911913 }
912914
913- err = sendToNotificationWorkflow (ctx , mainNotification , selectedApikey , org .Defaults .NotificationWorkflow , false , * authOrg )
914- if err != nil {
915- log .Printf ("[ERROR] Failed sending notification to workflowId %s for reference %s: %s" , org .Defaults .NotificationWorkflow , mainNotification .Id , err )
916- }
915+ go func () {
916+ err = sendToNotificationWorkflow (ctx , mainNotification , selectedApikey , org .Defaults .NotificationWorkflow , false , * authOrg )
917+ if err != nil {
918+ log .Printf ("[ERROR] Failed sending notification to workflowId %s for reference %s: %s" , org .Defaults .NotificationWorkflow , mainNotification .Id , err )
919+ }
920+ }()
917921 }
918922 }
919923
0 commit comments