public SetJobsRetriesCmd(IList <string> jobIds, int retries) { EnsureUtil.EnsureNotEmpty("Job ID's", string.Join(",", jobIds)); EnsureUtil.EnsureGreaterThanOrEqual("Retries count", retries, 0); this.JobIds = jobIds; this.Retries = retries; }
protected internal virtual void ValidateInput() { EnsureUtil.EnsureNotNull("workerId", WorkerId); EnsureUtil.EnsureGreaterThanOrEqual("maxResults", MaxResults, 0); foreach (var instruction in FetchInstructions.Values) { EnsureUtil.EnsureNotNull("topicName", instruction.TopicName); EnsureUtil.EnsurePositive("lockTime", instruction.LockDuration); } }
public override IBatch Execute(CommandContext commandContext) { var jobIds = CollectJobIds(commandContext); //EnsureUtil.EnsureNotEmpty(typeof(BadUserRequestException), "jobIds", jobIds); EnsureUtil.EnsureGreaterThanOrEqual("Retries count", Retries, 0); CheckAuthorizations(commandContext); WriteUserOperationLog(commandContext, Retries, jobIds.Count, true); var batch = CreateBatch(commandContext, jobIds); batch.CreateSeedJobDefinition(); batch.CreateMonitorJobDefinition(); batch.CreateBatchJobDefinition(); batch.FireHistoricStartEvent(); batch.CreateSeedJob(); return(batch); }
protected internal override void ValidateInput() { base.ValidateInput(); EnsureUtil.EnsureGreaterThanOrEqual("retries", Retries, 0); EnsureUtil.EnsureGreaterThanOrEqual("retryDuration", RetryDuration, 0); }
protected internal override void ValidateInput() { EnsureUtil.EnsureGreaterThanOrEqual("retries", Retries, 0); }