Add InterstitialGroups service and enhance SlotWriter and related components for interstitial handling
Introduced the InterstitialGroups service to manage interstitial group logic, preventing their inclusion in slots and fallback groups. Updated the SlotWriter class to utilize this service, ensuring proper validation during slot creation and updates. Enhanced error handling for interstitial groups in the ImportGridCommandHandler and UpdateTemplateCommandHandler, providing warnings instead of failures when interstitials are detected. Updated related tests to verify the correct behavior of these changes, ensuring robust handling of interstitials in the scheduling process.
This commit is contained in:
@@ -111,10 +111,12 @@ public class GridTransferTests
|
||||
)
|
||||
{
|
||||
await using var db = fixture.New();
|
||||
var result = await new ImportGridCommandHandler(db, new SlotWriter(db), Stats(db)).Handle(
|
||||
new ImportGridCommand(channelId, config, replace),
|
||||
CancellationToken.None
|
||||
);
|
||||
var result = await new ImportGridCommandHandler(
|
||||
db,
|
||||
GroupServices.Slots(db),
|
||||
Stats(db),
|
||||
GroupServices.Interstitials(db)
|
||||
).Handle(new ImportGridCommand(channelId, config, replace), CancellationToken.None);
|
||||
Assert.True(result.IsSuccess);
|
||||
await db.SaveChangesAsync(CancellationToken.None);
|
||||
return result.Value;
|
||||
|
||||
Reference in New Issue
Block a user