[
https://issues.apache.org/jira/browse/SYNCOPE-660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14563121#comment-14563121
]
ASF GitHub Bot commented on SYNCOPE-660:
----------------------------------------
Github user ilgrosso commented on a diff in the pull request:
https://github.com/apache/syncope/pull/6#discussion_r31247288
--- Diff:
core/src/main/java/org/apache/syncope/core/rest/controller/AbstractJobController.java
---
@@ -158,7 +158,19 @@ protected void actionJob(final String jobName, final
JobAction action) {
if (scheduler.getScheduler().checkExists(jobKey)) {
switch (action) {
case START:
- scheduler.getScheduler().triggerJob(jobKey);
+ Long currentId = getIdFromJobName(jobKey);
+ boolean found = false;
+ //Two or more equals jobs cannot be executed
concurrently
+ for (JobExecutionContext jec :
scheduler.getScheduler().getCurrentlyExecutingJobs()) {
--- End diff --
Please use plain `for` with `found` as guard, thus avoiding `break`.
> Extend control over asynchronous job execution
> ----------------------------------------------
>
> Key: SYNCOPE-660
> URL: https://issues.apache.org/jira/browse/SYNCOPE-660
> Project: Syncope
> Issue Type: Improvement
> Reporter: Francesco Chicchiriccò
> Assignee: Giacomo Lamonaco
> Fix For: 1.2.5, 2.0.0
>
>
> Asynchronous job execution, generally delegated to Quartz, can currently be
> checked only at completion, and only by indirectly checking the status on
> related JPA entities (TaskExec, ReportExec, ...).
> A REST endpoint should be provided for reporting on jobs execution and
> providing the ability to control (e.g. stop / pause / resume / ...) .
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)