コード例 #1
0
        public SetJobsRetriesCmd(IList <string> jobIds, int retries)
        {
            EnsureUtil.ensureNotEmpty("Job ID's", 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 (TopicFetchInstruction instruction in fetchInstructions.Values)
            {
                EnsureUtil.ensureNotNull("topicName", instruction.TopicName);
                EnsureUtil.ensurePositive("lockTime", instruction.LockDuration);
            }
        }
コード例 #3
0
        public override Batch execute(CommandContext commandContext)
        {
            IList <string> jobIds = collectJobIds(commandContext);

            ensureNotEmpty(typeof(BadUserRequestException), "jobIds", jobIds);
            EnsureUtil.ensureGreaterThanOrEqual("Retries count", retries, 0);
            checkAuthorizations(commandContext, BatchPermissions.CREATE_BATCH_SET_JOB_RETRIES);
            writeUserOperationLog(commandContext, retries, jobIds.Count, true);

            BatchEntity batch = createBatch(commandContext, jobIds);

            batch.createSeedJobDefinition();
            batch.createMonitorJobDefinition();
            batch.createBatchJobDefinition();

            batch.fireHistoricStartEvent();

            batch.createSeedJob();

            return(batch);
        }
コード例 #4
0
 protected internal override void validateInput()
 {
     EnsureUtil.ensureGreaterThanOrEqual(typeof(BadUserRequestException), "The number of retries cannot be negative", "retries", retries, 0);
 }