File tree Expand file tree Collapse file tree 5 files changed +18
-35
lines changed
Rock.Blocks/Communication
Rock/Model/Communication/Communication Expand file tree Collapse file tree 5 files changed +18
-35
lines changed Original file line number Diff line number Diff line change @@ -3030,39 +3030,8 @@ private void ProcessCommunicationSend( CommunicationEntryWizardCommunicationBag
30303030 }
30313031 }
30323032
3033- /*
3034- 1/2/2024 - JPH
3035-
3036- Rather than leveraging the default EF behavior of inserting each new recipient one-by-one,
3037- let's remove them from change tracking and perform a BULK INSERT operation instead, after
3038- saving the parent Communication record.
3039-
3040- We can get away with this because none of the downstream processes further reference the
3041- Communication.Recipients collection. If this changes, we will need to rethink this strategy.
3042-
3043- Reason: Communications with a large number of recipients time out and don't send.
3044- https://github.com/SparkDevNetwork/Rock/issues/5651
3045- */
3046- var newRecipients = new List < CommunicationRecipient > ( communication . Recipients . Where ( r => r . Id == 0 ) ) ;
3047-
3048- // Stop tracking these entities.
3049- communication . Recipients . RemoveAll ( newRecipients ) ;
3050-
3051- // Save the communication entity and any updated/deleted recipients.
3033+ // Save the communication entity.
30523034 rockContext . SaveChanges ( ) ;
3053-
3054- if ( newRecipients . Any ( ) )
3055- {
3056- using ( var bulkInsertActivity = ObservabilityHelper . StartActivity ( "COMMUNICATION: Entry Wizard > Send Communication > Bulk-Insert New Communication Recipients" ) )
3057- {
3058- foreach ( var recipient in newRecipients )
3059- {
3060- recipient . CommunicationId = communication . Id ;
3061- }
3062-
3063- rockContext . BulkInsert < CommunicationRecipient > ( newRecipients ) ;
3064- }
3065- }
30663035 }
30673036
30683037 // send approval email if needed (now that we have a communication id)
Original file line number Diff line number Diff line change @@ -563,6 +563,20 @@ public void RefreshCommunicationRecipientList( RockContext rockContext )
563563 return ;
564564 }
565565
566+ if ( ( rockContext . Database . CommandTimeout ?? 0 ) < 90 )
567+ {
568+ /*
569+ 12/1/2025 - JPH
570+
571+ We're increasing this timeout from the default of 30 seconds to give the following
572+ pre-send task more time to complete.
573+
574+ Reason: Communications with a large number of recipients time out and don't send.
575+ https://github.com/SparkDevNetwork/Rock/issues/5651
576+ */
577+ rockContext . Database . SetCommandTimeout ( 90 ) ;
578+ }
579+
566580 using ( var activity = ObservabilityHelper . StartActivity ( "COMMUNICATION: Prepare Recipient List > Refresh Communication Recipient List" ) )
567581 {
568582 /*
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ namespace RockWeb.Blocks.Reporting
8585 "Use Obsidian Components" ,
8686 Key = AttributeKey . UseObsidianComponents ,
8787 Description = "Switches the filter components to use Obsidian if supported." ,
88- DefaultBooleanValue = true ,
88+ DefaultBooleanValue = false ,
8989 Category = "Advanced" ) ]
9090
9191 [ Rock . SystemGuid . BlockTypeGuid ( "EB279DF9-D817-4905-B6AC-D9883F0DA2E4" ) ]
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ namespace RockWeb.Blocks.Reporting
5959 "Use Obsidian Components" ,
6060 Key = AttributeKey . UseObsidianComponents ,
6161 Description = "Switches the filter components to use Obsidian if supported." ,
62- DefaultBooleanValue = true ,
62+ DefaultBooleanValue = false ,
6363 Category = "Advanced" ) ]
6464
6565 [ Rock . SystemGuid . BlockTypeGuid ( "C7C069DB-9EEE-4245-9DF2-34E3A1FF4CCB" ) ]
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ namespace RockWeb.Blocks.Reporting
7676 "Use Obsidian Components" ,
7777 Key = AttributeKey . UseObsidianComponents ,
7878 Description = "Switches the filter components to use Obsidian if supported." ,
79- DefaultBooleanValue = true ,
79+ DefaultBooleanValue = false ,
8080 Category = "Advanced" ) ]
8181
8282 [ Rock . SystemGuid . BlockTypeGuid ( "E431DBDF-5C65-45DC-ADC5-157A02045CCD" ) ]
You can’t perform that action at this time.
0 commit comments