mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Merge pull request #6646 from jtkech/patch-3
[Fixes #6638] AliasHolderUpdater Refresh() is called 2 times
This commit is contained in:
commit
5ecfcd861a
@ -1,37 +0,0 @@
|
||||
using System;
|
||||
using Orchard.Environment;
|
||||
using Orchard.Tasks;
|
||||
using Orchard.Logging;
|
||||
|
||||
namespace Orchard.Alias.Implementation.Updater {
|
||||
public class AliasHolderUpdaterTask : IOrchardShellEvents, IBackgroundTask {
|
||||
private readonly IAliasHolderUpdater _aliasHolderUpdater;
|
||||
|
||||
public ILogger Logger { get; set; }
|
||||
|
||||
public AliasHolderUpdaterTask(IAliasHolderUpdater aliasHolderUpdater) {
|
||||
_aliasHolderUpdater = aliasHolderUpdater;
|
||||
Logger = NullLogger.Instance;
|
||||
}
|
||||
|
||||
void IOrchardShellEvents.Activated() {
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void IOrchardShellEvents.Terminating() {
|
||||
}
|
||||
|
||||
private void Refresh() {
|
||||
try {
|
||||
_aliasHolderUpdater.Refresh();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
Logger.Error(ex, "Exception during Alias refresh");
|
||||
}
|
||||
}
|
||||
|
||||
public void Sweep() {
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
@ -135,7 +135,6 @@
|
||||
<Compile Include="Implementation\Holder\IAliasHolder.cs" />
|
||||
<Compile Include="Implementation\Map\AliasMap.cs" />
|
||||
<Compile Include="Implementation\Storage\AliasStorage.cs" />
|
||||
<Compile Include="Implementation\Updater\AliasHolderUpdaterTask.cs" />
|
||||
<Compile Include="Implementation\Utils.cs" />
|
||||
<Compile Include="Migrations.cs" />
|
||||
<Compile Include="Recipes\Builders\AliasStep.cs" />
|
||||
@ -195,4 +194,4 @@
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user