fix saving yaml playout history (#2327)
* fix saving yaml playout history * cleanup
This commit is contained in:
@@ -30,16 +30,23 @@ public class ChannelController(ChannelWriter<IBackgroundServiceRequest> workerCh
|
||||
return new NotFoundResult();
|
||||
}
|
||||
|
||||
[HttpPost("/api/channels/{channelNumber}/playout/continue")]
|
||||
public async Task<IActionResult> ContinuePlayout(string channelNumber)
|
||||
{
|
||||
Option<int> maybePlayoutId = await mediator.Send(new GetPlayoutIdByChannelNumber(channelNumber));
|
||||
foreach (int playoutId in maybePlayoutId)
|
||||
{
|
||||
await workerChannel.WriteAsync(new BuildPlayout(playoutId, PlayoutBuildMode.Continue));
|
||||
return new OkResult();
|
||||
}
|
||||
|
||||
return new NotFoundResult();
|
||||
}
|
||||
// for debugging by fast-forwarding a YAML playout
|
||||
// [HttpPost("/api/channels/{channelNumber}/playout/continue")]
|
||||
// public async Task<IActionResult> ContinuePlayout(string channelNumber)
|
||||
// {
|
||||
// Option<int> maybePlayoutId = await mediator.Send(new GetPlayoutIdByChannelNumber(channelNumber));
|
||||
// foreach (int playoutId in maybePlayoutId)
|
||||
// {
|
||||
// DateTimeOffset start = DateTimeOffset.Now;
|
||||
// for (int i = 0; i < 24; i++)
|
||||
// {
|
||||
// await workerChannel.WriteAsync(new BuildPlayout(playoutId, PlayoutBuildMode.Continue, start));
|
||||
// start += TimeSpan.FromHours(1);
|
||||
// }
|
||||
//
|
||||
// return new OkResult();
|
||||
// }
|
||||
//
|
||||
// return new NotFoundResult();
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user