aborgatin commented on a change in pull request #489: GRIFFIN-240 Return
JobInstanceBean in response to a call Trigger job by id
URL: https://github.com/apache/griffin/pull/489#discussion_r270774300
##########
File path:
service/src/main/java/org/apache/griffin/core/job/JobServiceImpl.java
##########
@@ -666,9 +668,31 @@ public void triggerJobById(Long id) throws
SchedulerException {
.forJob(jobKey)
.startNow()
.build();
- scheduler.scheduleJob(trigger);
+ TriggerKey key = trigger.getKey();
+ CountDownLatch latch = new CountDownLatch(1);
+ String listenerName = "listenerJob_" + jobKey.toString();
+ try {
+ scheduler.getListenerManager().addTriggerListener(
+ new CountDownTriggerListener(latch, listenerName)
+ , key::equals);
+
+ scheduler.scheduleJob(trigger);
+
+ try {
+ latch.await(0, TimeUnit.MILLISECONDS);
Review comment:
Timeout don't used here by mistake, I fixed it
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services