コード例 #1
0
        public JobDetailsOutput GetJobDetails([FromBody] JobInput input)
        {
            var result = new JobDetailsOutput();

            try
            {
                var detailsData = _schedulerDataProvider.GetJobDetailsData(input.Job, input.Group);

                result.JobDataMap = detailsData
                                    .JobDataMap
                                    .Select(pair => new Property(pair.Key.ToString(), pair.Value))
                                    .ToArray();

                result.JobProperties = detailsData
                                       .JobProperties
                                       .Select(pair => new Property(pair.Key, pair.Value))
                                       .ToArray();
                result.Success = true;
            }
            catch (Exception ex)
            {
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
コード例 #2
0
ファイル: SchedulerCommand.cs プロジェクト: Thanak1234/test
        public JobDetailsOutput GetJobDetails(InputParameter param)
        {
            var output      = new JobDetailsOutput();
            var detailsData = SchedulerDataProvider.GetJobDetailsData(param.Job, param.Group);

            output.JobDataMap = detailsData
                                .JobDataMap
                                .Select(pair => new Property(pair.Key.ToString(), pair.Value))
                                .ToArray();

            output.JobProperties = detailsData
                                   .JobProperties
                                   .Select(pair => new Property(pair.Key, pair.Value))
                                   .ToArray();
            return(output);
        }