mirror of
https://gitee.com/justlive1/earth-frost.git
synced 2024-11-29 18:48:16 +08:00
增加任务超时预警
This commit is contained in:
parent
be8e4da5be
commit
fd51b18282
@ -104,4 +104,9 @@ public class JobInfo {
|
||||
*/
|
||||
private String[] childJobIds;
|
||||
|
||||
/**
|
||||
* 超时预警时间,单位秒
|
||||
*/
|
||||
private Long timeout;
|
||||
|
||||
}
|
||||
|
@ -253,6 +253,7 @@ public class DemoScriptJob implements IJob {
|
||||
auto: $scope.modalDatas.auto,
|
||||
failStrategy: $scope.modalDatas.failStrategy,
|
||||
notifyMails: mails,
|
||||
timeout : $scope.modalDatas.timeout,
|
||||
childJobIds: childJobIds
|
||||
};
|
||||
if($scope.modalDatas.type == 'SCRIPT'){
|
||||
@ -401,6 +402,7 @@ public class DemoScriptJob implements IJob {
|
||||
$scope.modalDatas.failStrategy = data.data.failStrategy;
|
||||
$scope.modalDatas.notifyMails = mails;
|
||||
$scope.modalDatas.childJobIds = data.data.childJobIds;
|
||||
$scope.modalDatas.timeout = data.data.timeout;
|
||||
if (data.data.group) {
|
||||
$scope.modalDatas.groupKey = data.data.group.groupKey;
|
||||
$scope.modalDatas.jobs = $scope.modalDatas.executorMap[$scope.modalDatas.groupKey];
|
||||
@ -466,6 +468,7 @@ public class DemoScriptJob implements IJob {
|
||||
param: $scope.modalDatas.param,
|
||||
failStrategy: $scope.modalDatas.failStrategy,
|
||||
notifyMails: mails,
|
||||
timeout: $scope.modalDatas.timeout,
|
||||
childJobIds: childJobIds
|
||||
};
|
||||
if (job.type == 'SCRIPT') {
|
||||
|
@ -25,8 +25,7 @@
|
||||
ng-change="$ctrl.executorChange()"
|
||||
ng-disabled="modalDatas.type == 'SCRIPT' && !modalDatas.useExecutor"
|
||||
ng-model="modalDatas.groupKey">
|
||||
<option ng-repeat="(k, v) in modalDatas.executorMap"
|
||||
value="{{k}}">{{k}}</option>
|
||||
<option ng-repeat="(k, v) in modalDatas.executorMap" value="{{k}}">{{k}}</option>
|
||||
</select>
|
||||
<div class="checkbox"
|
||||
style="display: inline-block; margin-left: 5px"
|
||||
@ -108,6 +107,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group inline-block">
|
||||
<label class="control-label width100"> 超时预警 </label>
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<input type="text" ng-model="modalDatas.timeout" placeholder="单位秒"
|
||||
class="input-large width235">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group inline-block" ng-if="modalDatas.opt == 1">
|
||||
<label class="control-label width100"> 自动运行 </label>
|
||||
<div class="controls">
|
||||
|
@ -99,6 +99,7 @@ public class RedisJobServiceImpl implements JobService {
|
||||
localJobInfo.setFailStrategy(jobInfo.getFailStrategy());
|
||||
localJobInfo.setNotifyMails(jobInfo.getNotifyMails());
|
||||
localJobInfo.setChildJobIds(jobInfo.getChildJobIds());
|
||||
localJobInfo.setTimeout(jobInfo.getTimeout());
|
||||
|
||||
jobRepository.updateJob(localJobInfo);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user