mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 06:18:28 +01:00
update sync task
This commit is contained in:
@@ -170,6 +170,17 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks
|
||||
QueueScheduledTask<T>(new TaskExecutionOptions());
|
||||
}
|
||||
|
||||
public void QueueIfNotRunning<T>()
|
||||
where T : IScheduledTask
|
||||
{
|
||||
var task = ScheduledTasks.First(t => t.ScheduledTask.GetType() == typeof(T));
|
||||
|
||||
if (task.State != TaskState.Running)
|
||||
{
|
||||
QueueScheduledTask<T>(new TaskExecutionOptions());
|
||||
}
|
||||
}
|
||||
|
||||
public void Execute<T>()
|
||||
where T : IScheduledTask
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user