コード例 #1
0
ファイル: SetJobsRetriesCmd.cs プロジェクト: zf321/ESS.FW.Bpm
        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);
 }