[ 
https://issues.apache.org/jira/browse/GRIFFIN-240?focusedWorklogId=215432&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-215432
 ]

ASF GitHub Bot logged work on GRIFFIN-240:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Mar/19 13:11
            Start Date: 19/Mar/19 13:11
    Worklog Time Spent: 10m 
      Work Description: aborgatin commented on 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_r266876882
 
 

 ##########
 File path: 
service/src/main/java/org/apache/griffin/core/job/CountDownTriggerListener.java
 ##########
 @@ -0,0 +1,49 @@
+package org.apache.griffin.core.job;
+
+import org.quartz.JobExecutionContext;
+import org.quartz.Trigger;
+import org.quartz.TriggerListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.concurrent.CountDownLatch;
+
+public class CountDownTriggerListener implements TriggerListener {
+    private static final Logger LOGGER = LoggerFactory
+            .getLogger(JobServiceImpl.class);
+    private CountDownLatch latch;
+    private String name;
+
+
+    public CountDownTriggerListener(CountDownLatch latch, String name) {
+        this.latch = latch;
+        this.name = name;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public void triggerFired(Trigger trigger, JobExecutionContext context) {
+        LOGGER.info("CountDownTriggerListener triggerFired");
 
 Review comment:
   I removed 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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 215432)
    Time Spent: 2h 10m  (was: 2h)

> [Service] Return JobInstance in response to a call Trigger job by id 
> ---------------------------------------------------------------------
>
>                 Key: GRIFFIN-240
>                 URL: https://issues.apache.org/jira/browse/GRIFFIN-240
>             Project: Griffin (Incubating)
>          Issue Type: Improvement
>            Reporter: Aleksandr Borgatin
>            Priority: Major
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> The proposal is following: in response of method "/jobs/trigger/\{id}" to 
> return JobInstance
> {code:java}
> @RequestMapping(value = "/jobs/trigger/{id}", method = RequestMethod.POST)
> @ResponseStatus(HttpStatus.OK)
> public JobInstanceBean triggerJob(@PathVariable("id") Long id) throws 
> SchedulerException
> { return jobService.triggerJobById(id); }{code}
> Now this method looks like this
> {code:java}
>     @RequestMapping(value = "/jobs/trigger/{id}", method = RequestMethod.POST)
>     @ResponseStatus(HttpStatus.NO_CONTENT)
>     public void triggerJob(@PathVariable("id") Long id) throws 
> SchedulerException {
>         jobService.triggerJobById(id);
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to