Added some additional logging to the metadata refresh

pull/3632/head
tidusjar 4 years ago
parent a7f747cf46
commit 87b94e3ed0

@ -4,6 +4,7 @@ using System.Linq;
using System.Threading.Tasks;
using Quartz;
using Quartz.Impl;
using Quartz.Impl.Matchers;
using Quartz.Spi;
namespace Ombi.Helpers

@ -66,11 +66,13 @@ namespace Ombi.Schedule.Jobs.Emby
public async Task Execute(IJobExecutionContext job)
{
_log.LogInformation("Starting Emby Availability Check");
await _notification.Clients.Clients(NotificationHub.AdminConnectionIds)
.SendAsync(NotificationHub.NotificationEvent, "Emby Availability Checker Started");
await ProcessMovies();
await ProcessTv();
_log.LogInformation("Finished Emby Availability Check");
await _notification.Clients.Clients(NotificationHub.AdminConnectionIds)
.SendAsync(NotificationHub.NotificationEvent, "Emby Availability Checker Finished");
}

@ -78,6 +78,7 @@ namespace Ombi.Schedule.Jobs.Emby
await _notification.Clients.Clients(NotificationHub.AdminConnectionIds)
.SendAsync(NotificationHub.NotificationEvent, "Emby Episode Sync Finished");
_logger.LogInformation("Emby Episode Sync Finished - Triggering Metadata refresh");
await OmbiQuartz.TriggerJob(nameof(IRefreshMetadata), "System");
}

@ -69,19 +69,19 @@ namespace Ombi.Schedule.Jobs.Ombi
if (embySettings.Enable)
{
await StartEmby(embySettings);
await OmbiQuartz.TriggerJob(nameof(IEmbyAvaliabilityChecker), "Emby");
await OmbiQuartz.TriggerJob(nameof(IEmbyAvaliabilityChecker), "Emby");
}
}
catch (Exception e)
{
_log.LogError(e, "Exception when refreshing the Plex Metadata");
_log.LogError(e, $"Exception when refreshing the Metadata Refresh");
await _notification.Clients.Clients(NotificationHub.AdminConnectionIds)
.SendAsync(NotificationHub.NotificationEvent, "Metadata Refresh Failed");
throw;
return;
}
_log.LogInformation("Metadata refresh finished");
await _notification.Clients.Clients(NotificationHub.AdminConnectionIds)
.SendAsync(NotificationHub.NotificationEvent, "Metadata Refresh Finished");
}

@ -63,7 +63,8 @@ namespace Ombi.Schedule.Jobs.Plex
_log.LogError(LoggingEvents.Cacher, e, "Caching Episodes Failed");
}
_log.LogInformation("Plex Episode Sync Finished - Triggering Metadata refresh");
await OmbiQuartz.TriggerJob(nameof(IRefreshMetadata), "System");
await _notification.Clients.Clients(NotificationHub.AdminConnectionIds)

@ -11,7 +11,6 @@
public string AutomaticUpdater { get; set; }
public string UserImporter { get; set; }
public string SickRageSync { get; set; }
public string RefreshMetadata { get; set; }
public string Newsletter { get; set; }
public string LidarrArtistSync { get; set; }
public string IssuesPurge { get; set; }

@ -56,11 +56,6 @@ namespace Ombi.Settings.Settings.Models
return ValidateCron(Get(s.SickRageSync, Cron.Hourly(35)));
}
public static string RefreshMetadata(JobSettings s)
{
return ValidateCron(Get(s.RefreshMetadata, Cron.DayInterval(3)));
}
public static string LidarrArtistSync(JobSettings s)
{
return ValidateCron(Get(s.LidarrArtistSync, Cron.Hourly(40)));

@ -140,7 +140,6 @@ export interface IJobSettings {
automaticUpdater: string;
userImporter: string;
sickRageSync: string;
refreshMetadata: string;
newsletter: string;
plexRecentlyAddedSync: string;
lidarrArtistSync: string;

@ -84,14 +84,6 @@
<small *ngIf="form.get('userImporter').hasError('required')" class="error-text">The User Importer is required</small>
<button type="button" class="btn btn-sm btn-primary-outline" (click)="testCron(form.get('userImporter')?.value)">Test</button>
</div>
<div class="form-group">
<label for="userImporter" class="control-label">Refresh Metadata</label>
<input type="text" class="form-control form-control-custom" [ngClass]="{'form-error': form.get('refreshMetadata').hasError('required')}" id="refreshMetadata" name="refreshMetadata" formControlName="refreshMetadata">
<small *ngIf="form.get('refreshMetadata').hasError('required')" class="error-text">The Refresh Metadata is required</small>
<button type="button" class="btn btn-sm btn-primary-outline" (click)="testCron(form.get('refreshMetadata')?.value)">Test</button>
</div>
<div class="form-group">
<label for="userImporter" class="control-label">Newsletter</label>

@ -28,7 +28,6 @@ export class JobsComponent implements OnInit {
sonarrSync: [x.sonarrSync, Validators.required],
radarrSync: [x.radarrSync, Validators.required],
sickRageSync: [x.sickRageSync, Validators.required],
refreshMetadata: [x.refreshMetadata, Validators.required],
newsletter: [x.newsletter, Validators.required],
plexRecentlyAddedSync: [x.plexRecentlyAddedSync, Validators.required],
lidarrArtistSync: [x.lidarrArtistSync, Validators.required],

@ -569,7 +569,6 @@ namespace Ombi.Controllers.V1
j.PlexContentSync = j.PlexContentSync.HasValue() ? j.PlexContentSync : JobSettingsHelper.PlexContent(j);
j.UserImporter = j.UserImporter.HasValue() ? j.UserImporter : JobSettingsHelper.UserImporter(j);
j.SickRageSync = j.SickRageSync.HasValue() ? j.SickRageSync : JobSettingsHelper.SickRageSync(j);
j.RefreshMetadata = j.RefreshMetadata.HasValue() ? j.RefreshMetadata : JobSettingsHelper.RefreshMetadata(j);
j.PlexRecentlyAddedSync = j.PlexRecentlyAddedSync.HasValue() ? j.PlexRecentlyAddedSync : JobSettingsHelper.PlexRecentlyAdded(j);
j.Newsletter = j.Newsletter.HasValue() ? j.Newsletter : JobSettingsHelper.Newsletter(j);
j.LidarrArtistSync = j.LidarrArtistSync.HasValue() ? j.LidarrArtistSync : JobSettingsHelper.LidarrArtistSync(j);

Loading…
Cancel
Save