Further cleanup. Moved BackgroundJob Task enqueues into TaskScheduler, so I can have complete control via one interface.

This commit is contained in:
Joseph Milazzo 2021-01-18 13:53:24 -06:00
parent 825afd83a2
commit 26660a9bb3
7 changed files with 47 additions and 43 deletions

View file

@ -8,13 +8,11 @@ namespace API.Interfaces
public interface ILibraryRepository
{
void Update(Library library);
Task<IEnumerable<LibraryDto>> GetLibrariesAsync();
Task<IEnumerable<LibraryDto>> GetLibraryDtosAsync();
Task<bool> LibraryExists(string libraryName);
Task<Library> GetLibraryForIdAsync(int libraryId);
bool SaveAll();
Task<IEnumerable<LibraryDto>> GetLibrariesDtoForUsernameAsync(string userName);
Task<IEnumerable<LibraryDto>> GetLibraryDtosForUsernameAsync(string userName);
Task<Library> GetLibraryForNameAsync(string libraryName);
Task<bool> DeleteLibrary(int libraryId);
}
}

View file

@ -2,6 +2,8 @@
{
public interface ITaskScheduler
{
public void ScanLibrary(int libraryId, bool forceUpdate = false);
public void CleanupVolumes(int[] volumeIds);
}
}