예제 #1
0
        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;
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
        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);
        }
예제 #4
0
 protected internal override void ValidateInput()
 {
     base.ValidateInput();
     EnsureUtil.EnsureGreaterThanOrEqual("retries", Retries, 0);
     EnsureUtil.EnsureGreaterThanOrEqual("retryDuration", RetryDuration, 0);
 }
예제 #5
0
 protected internal override void ValidateInput()
 {
     EnsureUtil.EnsureGreaterThanOrEqual("retries", Retries, 0);
 }