More Scan Loop Bugfixes (#1471)
* Updated scan time for watcher to 30 seconds for non-dev. Moved ScanFolder off the Scan queue as it doesn't need to be there. Updated loggers * Fixed jumpbar missing * Tweaked the messaging for CoverGen * When we return early due to nothing being done on library and series scan, make sure we kick off other tasks that need to occur. * Fixed a foreign constraint issue on Volumes when we were adding to a new series. * Fixed a case where when picking normalized series, capitalization differences wouldn't stack when they should. * Reduced the logging output on dev and prod settings. * Fixed a bug in the code that finds the highest directory from a file, where we were not checking against a normalized path. * Cleaned up some code * Fixed broken unit tests
This commit is contained in:
parent
fc0121e7a8
commit
1e535a8184
14 changed files with 77 additions and 62 deletions
|
@ -1,4 +1,5 @@
|
|||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using API.Data.Repositories;
|
||||
using API.Entities;
|
||||
using AutoMapper;
|
||||
|
@ -26,7 +27,6 @@ public interface IUnitOfWork
|
|||
bool Commit();
|
||||
Task<bool> CommitAsync();
|
||||
bool HasChanges();
|
||||
bool Rollback();
|
||||
Task<bool> RollbackAsync();
|
||||
}
|
||||
public class UnitOfWork : IUnitOfWork
|
||||
|
@ -93,16 +93,15 @@ public class UnitOfWork : IUnitOfWork
|
|||
/// <returns></returns>
|
||||
public async Task<bool> RollbackAsync()
|
||||
{
|
||||
await _context.DisposeAsync();
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// Rollback transaction
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool Rollback()
|
||||
{
|
||||
_context.Dispose();
|
||||
try
|
||||
{
|
||||
await _context.Database.RollbackTransactionAsync();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Swallow exception (this might be used in places where a transaction isn't setup)
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue