Skip to content

Commit

Permalink
Code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jevgenijsp committed Nov 26, 2024
1 parent f15bb7d commit 9eb600a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -305,6 +301,11 @@ services.AddNotFoundHandler(o =>
- OptimizelyScheduler - uses Optimizely to schedule job runs.
An Optimizely scheduled job was added - <code>[Geta NotFoundHandler] Suggestions cleanup job</code>.

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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static IApplicationBuilder UseNotFoundHandler(this IApplicationBuilder ap

if (options.UseInternalScheduler)
{
app.UseScheduler();
app.UseInternalScheduler();
}

return app;
Expand Down

0 comments on commit 9eb600a

Please sign in to comment.