Refactor user and media endpoints: remove unused GetUser and GetMedia methods, streamline AdminUserEndpoints and MediaEndpoints, and enhance metadata handling in MetadataEndpoints. Update Program.cs to remove legacy image relocation logic and improve overall code clarity.
This commit is contained in:
@@ -1,20 +1,6 @@
|
||||
using System.Threading.Channels;
|
||||
using TeleWave.Application.Common.Interfaces;
|
||||
|
||||
namespace TeleWave.Infrastructure.Media;
|
||||
|
||||
/// <summary>Сигнальная очередь-будильник поверх Channel (id ассета — лишь сигнал; работу берём из БД).</summary>
|
||||
public sealed class BumperRenderQueue : IBumperRenderQueue
|
||||
{
|
||||
private readonly Channel<Guid> _channel = Channel.CreateUnbounded<Guid>(
|
||||
new UnboundedChannelOptions { SingleReader = true }
|
||||
);
|
||||
|
||||
public void Enqueue(Guid assetId) => _channel.Writer.TryWrite(assetId);
|
||||
|
||||
public async ValueTask WaitAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
await _channel.Reader.ReadAsync(cancellationToken);
|
||||
while (_channel.Reader.TryRead(out _)) { }
|
||||
}
|
||||
}
|
||||
/// <summary>Сигнальная очередь-будильник рендерера заставок (см. <see cref="SignalQueue"/>).</summary>
|
||||
public sealed class BumperRenderQueue : SignalQueue, IBumperRenderQueue { }
|
||||
|
||||
Reference in New Issue
Block a user