public Task <bool> DeleteAsync(string jobId) { Throw.IfArgumentNull(jobId, nameof(jobId)); var successfulDeletion = HangfireBackgroundJob.Delete(jobId); return(Task.FromResult(successfulDeletion)); }
/// <summary> /// 删除一个队列Job /// </summary> /// <param name="jobId"></param> /// <returns></returns> public Task <bool> DeleteAsync(string jobId) { if (string.IsNullOrWhiteSpace(jobId)) { throw new ArgumentNullException(nameof(jobId)); } bool successfulDeletion = HangfireBackgroundJob.Delete(jobId); return(Task.FromResult(successfulDeletion)); }
public virtual bool Delete(string jobId) { if (string.IsNullOrWhiteSpace(jobId)) { throw new ArgumentNullException(nameof(jobId)); } bool successfulDeletion = HangfireBackgroundJob.Delete(jobId); return(successfulDeletion); }