Esempio n. 1
0
        public Task <bool> DeleteAsync(string jobId)
        {
            Throw.IfArgumentNull(jobId, nameof(jobId));
            var successfulDeletion = HangfireBackgroundJob.Delete(jobId);

            return(Task.FromResult(successfulDeletion));
        }
Esempio n. 2
0
        /// <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));
        }
Esempio n. 3
0
        public virtual bool Delete(string jobId)
        {
            if (string.IsNullOrWhiteSpace(jobId))
            {
                throw new ArgumentNullException(nameof(jobId));
            }

            bool successfulDeletion = HangfireBackgroundJob.Delete(jobId);

            return(successfulDeletion);
        }