mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-03 09:09:42 +02:00
Added integration to deskmetrics
This commit is contained in:
39
NzbDrone.Core/Jobs/CheckpointJob.cs
Normal file
39
NzbDrone.Core/Jobs/CheckpointJob.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Ninject;
|
||||
using NzbDrone.Core.Model.Notification;
|
||||
using NzbDrone.Core.Providers;
|
||||
|
||||
namespace NzbDrone.Core.Jobs
|
||||
{
|
||||
public class CheckpointJob : IJob
|
||||
{
|
||||
private readonly AnalyticsProvider _analyticsProvider;
|
||||
|
||||
[Inject]
|
||||
public CheckpointJob(AnalyticsProvider analyticsProvider)
|
||||
{
|
||||
_analyticsProvider = analyticsProvider;
|
||||
}
|
||||
|
||||
public CheckpointJob()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "Checkpoint Job"; }
|
||||
}
|
||||
|
||||
public TimeSpan DefaultInterval
|
||||
{
|
||||
get { return TimeSpan.FromDays(1); }
|
||||
}
|
||||
|
||||
public void Start(ProgressNotification notification, int targetId, int secondaryTargetId)
|
||||
{
|
||||
_analyticsProvider.Checkpoint();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user