mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-19 21:44:30 -04:00
disable model events for log repository
This commit is contained in:
@@ -106,7 +106,7 @@ namespace NzbDrone.Core.Datastore
|
||||
}
|
||||
|
||||
DataMapper.Insert(model);
|
||||
_messageAggregator.PublishEvent(new ModelEvent<TModel>(model, ModelEvent<TModel>.RepositoryAction.Created));
|
||||
PublishModelEvent(model, RepositoryAction.Created);
|
||||
|
||||
return model;
|
||||
}
|
||||
@@ -193,5 +193,11 @@ namespace NzbDrone.Core.Datastore
|
||||
.Execute();
|
||||
}
|
||||
|
||||
|
||||
protected virtual void PublishModelEvent(TModel model, RepositoryAction action)
|
||||
{
|
||||
_messageAggregator.PublishEvent(new ModelEvent<TModel>(model, action));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,14 +13,13 @@ namespace NzbDrone.Core.Datastore.Events
|
||||
Model = model;
|
||||
Action = action;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public enum RepositoryAction
|
||||
{
|
||||
Created = 1,
|
||||
Updated = 2,
|
||||
Deleted = 3
|
||||
}
|
||||
public enum RepositoryAction
|
||||
{
|
||||
Created = 1,
|
||||
Updated = 2,
|
||||
Deleted = 3
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user