private Task DeleteCachedProgressDelayedAsync(string jobID) { return(Task.Delay(60000).ContinueWith(_ => { jobDAL.DeleteCachedProgressAsync(jobID); }, TaskContinuationOptions.RunContinuationsAsynchronously)); }
///<summary> /// Resets non running jobs. Jobs will be ready for another run after a successful reset. ///</summary> ///<param name="jobIDs">Job IDs collection.</param> ///<returns>Number of affected jobs.</returns> public int ResetJobs(IList <string> jobIDs) { if (jobIDs == null || jobIDs.Count == 0) { return(0); } jobDAL.DeleteCachedProgressAsync(jobIDs); return(jobDAL.Reset(jobIDs)); }