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_r266863242
 
 

 ##########
 File path: service/src/main/java/org/apache/griffin/core/job/JobController.java
 ##########
 @@ -115,8 +120,19 @@ public JobHealth getHealthInfo() {
     }
 
     @RequestMapping(value = "/jobs/trigger/{id}", method = RequestMethod.POST)
-    @ResponseStatus(HttpStatus.NO_CONTENT)
-    public void triggerJob(@PathVariable("id") Long id) throws 
SchedulerException {
-        jobService.triggerJobById(id);
+    @ResponseStatus(HttpStatus.OK)
+    public JobInstanceBean triggerJob(@PathVariable("id") Long id, 
@RequestBody(required = false) String request) throws SchedulerException {
+        return jobService.triggerJobById(id, extractTimeOut(request));
+    }
+
+    private long extractTimeOut(String request) {
 
 Review comment:
   Of course I can remove this param from request and use is only as 
configuration property. Sometimes there are situations when we need to wait for 
the creation of JobInstanceBean, but in other situations it is not necessary 
(see https://github.com/apache/griffin/pull/489#discussion_r266855423)
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to