From d74609d70da3184c47e99fe5dd4865c02f97eb8c Mon Sep 17 00:00:00 2001 From: JunFeng Wu Date: Tue, 4 Apr 2023 10:19:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0Quartz=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=88=B0=E6=9C=80=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SilkierQuartz/SilkierQuartz.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SilkierQuartz/SilkierQuartz.csproj b/src/SilkierQuartz/SilkierQuartz.csproj index 072c497..326917b 100644 --- a/src/SilkierQuartz/SilkierQuartz.csproj +++ b/src/SilkierQuartz/SilkierQuartz.csproj @@ -68,7 +68,7 @@ - + From 0f6172ce4b24924640b836531117c14b73189194 Mon Sep 17 00:00:00 2001 From: JunFeng Wu Date: Tue, 4 Apr 2023 10:36:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=92=8C=E7=BC=96?= =?UTF-8?q?=E8=BE=91job=E6=96=B0=E5=A2=9EConcurrent=E3=80=81Persist?= =?UTF-8?q?=E3=80=81durable=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/JobsController.cs | 6 ++++ src/SilkierQuartz/Models/JobViewModel.cs | 7 +++++ src/SilkierQuartz/Views/Jobs/Edit.hbs | 31 +++++++++++++++---- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/SilkierQuartz/Controllers/JobsController.cs b/src/SilkierQuartz/Controllers/JobsController.cs index 0750c70..8ce6306 100644 --- a/src/SilkierQuartz/Controllers/JobsController.cs +++ b/src/SilkierQuartz/Controllers/JobsController.cs @@ -118,6 +118,9 @@ namespace SilkierQuartz.Controllers jobModel.Description = job.Description; jobModel.Recovery = job.RequestsRecovery; + jobModel.Concurrent = !job.ConcurrentExecutionDisallowed; + jobModel.Persist = job.PersistJobDataAfterExecution; + jobModel.Durable = job.Durable; if (clone) jobModel.JobName += " - Copy"; @@ -158,6 +161,9 @@ namespace SilkierQuartz.Controllers .WithDescription(jobModel.Description) .SetJobData(jobDataMap.GetQuartzJobDataMap()) .RequestRecovery(jobModel.Recovery) + .StoreDurably(jobModel.Durable) + .DisallowConcurrentExecution(jobModel.Concurrent) + .PersistJobDataAfterExecution(jobModel.Persist) .Build(); } diff --git a/src/SilkierQuartz/Models/JobViewModel.cs b/src/SilkierQuartz/Models/JobViewModel.cs index 22f7f83..df7e8f0 100644 --- a/src/SilkierQuartz/Models/JobViewModel.cs +++ b/src/SilkierQuartz/Models/JobViewModel.cs @@ -37,6 +37,13 @@ namespace SilkierQuartz.Models public string Description { get; set; } public bool Recovery { get; set; } + + public bool Concurrent { get; set; } + + public bool Durable { get; set; } + + public bool Persist { get; set; } + public void Validate(ICollection errors) => ModelValidator.ValidateObject(this, errors, nameof(JobViewModel.Job)); } diff --git a/src/SilkierQuartz/Views/Jobs/Edit.hbs b/src/SilkierQuartz/Views/Jobs/Edit.hbs index 4e44084..c2aab58 100644 --- a/src/SilkierQuartz/Views/Jobs/Edit.hbs +++ b/src/SilkierQuartz/Views/Jobs/Edit.hbs @@ -60,18 +60,37 @@ {{>DropdownOptions items=TypeList selected=Type}} -
- -
-
- - +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
{{/with}}

Job Data Map