[
https://issues.apache.org/jira/browse/GRIFFIN-240?focusedWorklogId=219307&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-219307
]
ASF GitHub Bot logged work on GRIFFIN-240:
------------------------------------------
Author: ASF GitHub Bot
Created on: 27/Mar/19 14:13
Start Date: 27/Mar/19 14:13
Worklog Time Spent: 10m
Work Description: RodionGork 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_r269582900
##########
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) {
+ long timeout = 0;
Review comment:
@chemikadze on the other hand, such behavior corresponds to existing
behavior, if I got it right. Otherwise it may happen that updated API
introduces delays on requests where users perhaps don't expect them yet. Of
course it would be amended by default value 0 for timeout in config... Well...
I feel like this situation about timeout needs a bit more consideration.
----------------------------------------------------------------
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: 219307)
Time Spent: 3.5h (was: 3h 20m)
> [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: 3.5h
> 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)