diff --git a/README.md b/README.md index 0fd8724..eca37a0 100644 --- a/README.md +++ b/README.md @@ -274,10 +274,6 @@ It will monitor primary, secondary and SEO URLs: Optimizely Content Cloud supports only primary URLs and Optimizely Commerce supports all three types of URLs. -There are two scheduled jobs: -- *[Geta NotFoundHandler] Index content URLs* - as mentioned before, this job indexes URLs of content. Usually, it is required to run this job only once. All new content is automatically indexed. But if for some reason content publish events are not firing when creating new content (for example, during the import), then you should set this job to run frequently. - - *[Geta NotFoundHandler] Register content move redirects* - this job creates redirects based on registered moved content. Normally, this job is not required at all, but there might be situations when content move is registered but redirect creation is not completed. This could happen during deployments. In this case, you can manually run this job or schedule it to run time to time to fix such issues. - # Scheduled jobs Scheduled job - process that runs in background @@ -305,6 +301,11 @@ services.AddNotFoundHandler(o => - OptimizelyScheduler - uses Optimizely to schedule job runs. An Optimizely scheduled job was added - [Geta NotFoundHandler] Suggestions cleanup job. +Additionally, there are two optimizely scheduled jobs responsible for: +- *[Geta NotFoundHandler] Index content URLs* - as mentioned before, this job indexes URLs of content. Usually, it is required to run this job only once. All new content is automatically indexed. But if for some reason content publish events are not firing when creating new content (for example, during the import), then you should set this job to run frequently. +- *[Geta NotFoundHandler] Register content move redirects* - this job creates redirects based on registered moved content. Normally, this job is not required at all, but there might be situations when content move is registered but redirect creation is not completed. This could happen during deployments. In this case, you can manually run this job or schedule it to run time to time to fix such issues. + + # Troubleshooting The module has extensive logging. Turn on debug logging for the `Geta.NotFoundHandler` namespace in your logging configuration. diff --git a/src/Geta.NotFoundHandler/Core/ScheduledJobs/ApplicationBuilderExtensions.cs b/src/Geta.NotFoundHandler/Core/ScheduledJobs/ApplicationBuilderExtensions.cs index 2bfae1e..61cd25e 100644 --- a/src/Geta.NotFoundHandler/Core/ScheduledJobs/ApplicationBuilderExtensions.cs +++ b/src/Geta.NotFoundHandler/Core/ScheduledJobs/ApplicationBuilderExtensions.cs @@ -13,7 +13,7 @@ namespace Geta.NotFoundHandler.Core.ScheduledJobs; public static class ApplicationBuilderExtensions { - public static IApplicationBuilder UseScheduler(this IApplicationBuilder app) + public static IApplicationBuilder UseInternalScheduler(this IApplicationBuilder app) { var services = app.ApplicationServices; @@ -29,7 +29,7 @@ public static IApplicationBuilder UseScheduler(this IApplicationBuilder app) }) .OnError(x => { - logger.LogError(x, "Something went wrong, scheduled job fails with exception"); + logger.LogError(x, "Something went wrong, scheduled job failed with exception"); }); return app; diff --git a/src/Geta.NotFoundHandler/Infrastructure/Initialization/ApplicationBuilderExtensions.cs b/src/Geta.NotFoundHandler/Infrastructure/Initialization/ApplicationBuilderExtensions.cs index 07dc72b..73f21ee 100644 --- a/src/Geta.NotFoundHandler/Infrastructure/Initialization/ApplicationBuilderExtensions.cs +++ b/src/Geta.NotFoundHandler/Infrastructure/Initialization/ApplicationBuilderExtensions.cs @@ -28,7 +28,7 @@ public static IApplicationBuilder UseNotFoundHandler(this IApplicationBuilder ap if (options.UseInternalScheduler) { - app.UseScheduler(); + app.UseInternalScheduler(); } return app;