mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 03:28:28 -07:00
Develop (#2947)
* Start the scheduler after the jobs have been assigned * More to debug logging * logging
This commit is contained in:
parent
2dd5c27ea3
commit
d6b9cbc71e
5 changed files with 11 additions and 6 deletions
|
@ -192,7 +192,7 @@ namespace Ombi.DependencyInjection
|
||||||
|
|
||||||
public static void RegisterJobs(this IServiceCollection services)
|
public static void RegisterJobs(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddTransient<IJobFactory, IoCJobFactory>(provider => new IoCJobFactory(provider));
|
services.AddSingleton<IJobFactory, IoCJobFactory>(provider => new IoCJobFactory(provider));
|
||||||
services.AddTransient<IBackgroundJobClient, BackgroundJobClient>();
|
services.AddTransient<IBackgroundJobClient, BackgroundJobClient>();
|
||||||
|
|
||||||
services.AddTransient<IPlexContentSync, PlexContentSync>();
|
services.AddTransient<IPlexContentSync, PlexContentSync>();
|
||||||
|
|
|
@ -131,8 +131,11 @@ namespace Ombi.Schedule.Jobs.Plex
|
||||||
await OmbiQuartz.TriggerJob(nameof(IPlexAvailabilityChecker), "Plex");
|
await OmbiQuartz.TriggerJob(nameof(IPlexAvailabilityChecker), "Plex");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger.LogInformation("Finished Plex Content Cacher, with processed content: {0}, episodes: {0}", processedContent.Content.Count(), processedContent.Episodes.Count());
|
||||||
|
|
||||||
await Notification.Clients.Clients(NotificationHub.AdminConnectionIds)
|
await Notification.Clients.Clients(NotificationHub.AdminConnectionIds)
|
||||||
.SendAsync(NotificationHub.NotificationEvent, recentlyAddedSearch ? "Plex Recently Added Sync Finished" : "Plex Content Sync Finished");
|
.SendAsync(NotificationHub.NotificationEvent, recentlyAddedSearch ? "Plex Recently Added Sync Finished" : "Plex Content Sync Finished");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<ProcessedContent> StartTheCache(PlexSettings plexSettings, bool recentlyAddedSearch)
|
private async Task<ProcessedContent> StartTheCache(PlexSettings plexSettings, bool recentlyAddedSearch)
|
||||||
|
|
|
@ -60,7 +60,10 @@ namespace Ombi.Schedule
|
||||||
{
|
{
|
||||||
ITrigger jobTrigger = TriggerBuilder.Create()
|
ITrigger jobTrigger = TriggerBuilder.Create()
|
||||||
.WithIdentity(name + "Trigger", group)
|
.WithIdentity(name + "Trigger", group)
|
||||||
.WithCronSchedule(cronExpression)
|
.WithCronSchedule(cronExpression,
|
||||||
|
x => x.WithMisfireHandlingInstructionFireAndProceed())
|
||||||
|
.ForJob(name, group)
|
||||||
|
.StartNow()
|
||||||
.Build();
|
.Build();
|
||||||
await Scheduler.ScheduleJob(job, jobTrigger);
|
await Scheduler.ScheduleJob(job, jobTrigger);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,15 +48,14 @@ namespace Ombi.Schedule
|
||||||
// Set job factory
|
// Set job factory
|
||||||
OmbiQuartz.Instance.UseJobFactory(jobFactory);
|
OmbiQuartz.Instance.UseJobFactory(jobFactory);
|
||||||
|
|
||||||
// Run Quartz
|
|
||||||
await OmbiQuartz.Start();
|
|
||||||
|
|
||||||
// Run configuration
|
// Run configuration
|
||||||
await AddPlex(s);
|
await AddPlex(s);
|
||||||
await AddEmby(s);
|
await AddEmby(s);
|
||||||
await AddDvrApps(s);
|
await AddDvrApps(s);
|
||||||
await AddSystem(s);
|
await AddSystem(s);
|
||||||
|
|
||||||
|
// Run Quartz
|
||||||
|
await OmbiQuartz.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async Task AddSystem(JobSettings s)
|
private static async Task AddSystem(JobSettings s)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"IncludeScopes": false,
|
"IncludeScopes": false,
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Debug",
|
||||||
"System": "Information",
|
"System": "Information",
|
||||||
"Microsoft": "None",
|
"Microsoft": "None",
|
||||||
"Hangfire": "None"
|
"Hangfire": "None"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue