mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 16:22:55 -07:00
Added logging
This commit is contained in:
parent
f112af7e85
commit
e4f9b4c71e
1 changed files with 6 additions and 0 deletions
|
@ -292,14 +292,20 @@ namespace PlexRequests.Store.Repository
|
|||
db.Open();
|
||||
using (var tran = db.BeginTransaction())
|
||||
{
|
||||
Log.Trace("Starting Transaction");
|
||||
var result = enumerable.Sum(e => db.Insert(e));
|
||||
var done = result == enumerable.Length;
|
||||
|
||||
Log.Trace($"Total Result: {done}");
|
||||
Log.Trace($"db result: {result}");
|
||||
Log.Trace($"totalitems result: {enumerable.Length}");
|
||||
if (done)
|
||||
{
|
||||
Log.Trace("Committed the tran");
|
||||
tran.Commit();
|
||||
return true;
|
||||
}
|
||||
Log.Trace("Rolling back the tran");
|
||||
|
||||
tran.Rollback();
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue