|
|
@ -22,7 +22,6 @@ namespace Squidex.Domain.Apps.Entities.Contents.Text |
|
|
{ |
|
|
{ |
|
|
public sealed class GrainTextIndexer : ITextIndexer, IEventConsumer |
|
|
public sealed class GrainTextIndexer : ITextIndexer, IEventConsumer |
|
|
{ |
|
|
{ |
|
|
private readonly RetryWindow retryWindow = new RetryWindow(TimeSpan.FromMinutes(5), 5); |
|
|
|
|
|
private readonly IGrainFactory grainFactory; |
|
|
private readonly IGrainFactory grainFactory; |
|
|
private readonly ISemanticLog log; |
|
|
private readonly ISemanticLog log; |
|
|
|
|
|
|
|
|
@ -57,8 +56,6 @@ namespace Squidex.Domain.Apps.Entities.Contents.Text |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public async Task On(Envelope<IEvent> @event) |
|
|
public async Task On(Envelope<IEvent> @event) |
|
|
{ |
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
{ |
|
|
if (@event.Payload is ContentEvent contentEvent) |
|
|
if (@event.Payload is ContentEvent contentEvent) |
|
|
{ |
|
|
{ |
|
|
@ -90,20 +87,6 @@ namespace Squidex.Domain.Apps.Entities.Contents.Text |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
catch (Exception ex) |
|
|
|
|
|
{ |
|
|
|
|
|
if (retryWindow.CanRetryAfterFailure()) |
|
|
|
|
|
{ |
|
|
|
|
|
log.LogError(ex, w => w |
|
|
|
|
|
.WriteProperty("action", "DeleteTextEntry") |
|
|
|
|
|
.WriteProperty("status", "Failed")); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
throw; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static J<IndexData> Data(NamedContentData data) |
|
|
private static J<IndexData> Data(NamedContentData data) |
|
|
{ |
|
|
{ |
|
|
|