Interface IBackgroundDeletionService
Background deletion service. Fire-and-forget delete: callers mark objects, return
immediately, and a polling worker physically purges the trash on a separate DB
connection. State of truth lives entirely in _objects rows (trash containers
with _value_string='pending') — the worker drives off DB polling, so a
worker crash or force-kill leaves no in-memory state to recover from.
public interface IBackgroundDeletionService
Properties
QueueLength
Always 0 in the DB-polling design — there is no in-memory queue. Callers who
int QueueLength { get; }
Methods
DeleteAsync(IEnumerable<long>, IRedbUser, int, long?)
Mark objects for deletion. Returns once IObjectStorageProvider.SoftDeleteAsync(IEnumerable<long>, long?)
Task<DeletionMark> DeleteAsync(IEnumerable<long> objectIds, IRedbUser user, int batchSize = 10, long? trashParentId = null)
EnqueuePurge(long, int, long, int)
No-op in the DB-polling design. Kept on the interface so callers that did a
void EnqueuePurge(long trashId, int totalCount, long userId, int batchSize = 10)
GetProgressAsync(long)
Get current progress for a trash container from database.
Task<PurgeProgress?> GetProgressAsync(long trashId)
GetUserActiveProgressAsync(long)
Get all active (pending/running) deletions for a user from database.
Task<List<PurgeProgress>> GetUserActiveProgressAsync(long userId)