You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@griffin.apache.org by GitBox <gi...@apache.org> on 2019/04/04 16:04:27 UTC

[GitHub] [griffin] chemikadze commented on a change in pull request #494: GRIFFIN-240 trigger returns triggerkey

chemikadze commented on a change in pull request #494: GRIFFIN-240 trigger returns triggerkey
URL: https://github.com/apache/griffin/pull/494#discussion_r272251722
 
 

 ##########
 File path: service/src/main/java/org/apache/griffin/core/job/JobController.java
 ##########
 @@ -120,8 +124,13 @@ 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 Map<String, Object> triggerJob(@PathVariable("id") Long id, @RequestBody(required = false) String request) throws SchedulerException {
+        return Collections.singletonMap("triggerKey", jobService.triggerJobById(id));
+    }
+
+    @RequestMapping(value = "jobs/trigger/{triggerKey:.+}", method = RequestMethod.GET)
 
 Review comment:
   it would be semantically more correct to have it as different "collection", because ids are completely different

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


With regards,
Apache Git Services