diff options
| author | Mike <github@barry.io> | 2015-02-25 15:55:01 -0500 |
|---|---|---|
| committer | Mike <github@barry.io> | 2015-02-26 09:05:12 -0500 |
| commit | 5b9999eccff26db4f285179ed0b682f46f6dad81 (patch) | |
| tree | 7bb002e460d4668e0ee2fc20b8745fe848d5d6ed /MediaBrowser.Common/ScheduledTasks/ITaskManager.cs | |
| parent | 17ea0217f57f4439d65edcfd2091f1bb47570438 (diff) | |
Prototype 2 of max task length for scheduled tasks.
Diffstat (limited to 'MediaBrowser.Common/ScheduledTasks/ITaskManager.cs')
| -rw-r--r-- | MediaBrowser.Common/ScheduledTasks/ITaskManager.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/MediaBrowser.Common/ScheduledTasks/ITaskManager.cs b/MediaBrowser.Common/ScheduledTasks/ITaskManager.cs index 01dc355c3..9b3f18274 100644 --- a/MediaBrowser.Common/ScheduledTasks/ITaskManager.cs +++ b/MediaBrowser.Common/ScheduledTasks/ITaskManager.cs @@ -17,7 +17,8 @@ namespace MediaBrowser.Common.ScheduledTasks /// Cancels if running and queue. /// </summary> /// <typeparam name="T"></typeparam> - void CancelIfRunningAndQueue<T>() + /// <param name="options">Task options.</param> + void CancelIfRunningAndQueue<T>(TaskExecutionOptions options = null) where T : IScheduledTask; /// <summary> @@ -31,14 +32,16 @@ namespace MediaBrowser.Common.ScheduledTasks /// Queues the scheduled task. /// </summary> /// <typeparam name="T"></typeparam> - void QueueScheduledTask<T>() + /// <param name="options">Task options.</param> + void QueueScheduledTask<T>(TaskExecutionOptions options = null) where T : IScheduledTask; /// <summary> /// Queues the scheduled task. /// </summary> /// <param name="task">The task.</param> - void QueueScheduledTask(IScheduledTask task); + /// <param name="options">The task run options.</param> + void QueueScheduledTask(IScheduledTask task, TaskExecutionOptions options = null); /// <summary> /// Adds the tasks. @@ -47,7 +50,7 @@ namespace MediaBrowser.Common.ScheduledTasks void AddTasks(IEnumerable<IScheduledTask> tasks); void Cancel(IScheduledTaskWorker task); - Task Execute(IScheduledTaskWorker task); + Task Execute(IScheduledTaskWorker task, TaskExecutionOptions options = null); event EventHandler<GenericEventArgs<IScheduledTaskWorker>> TaskExecuting; event EventHandler<TaskCompletionEventArgs> TaskCompleted; |
