feat: 单次执行的任务,可以手动触发执行一次同步数据的任务

This commit is contained in:
taojinlong 2022-11-22 16:04:54 +08:00
parent 353fd47bb3
commit 4fbf4626cb
3 changed files with 7 additions and 8 deletions

View File

@ -335,6 +335,10 @@ public class DataSetTableTaskService {
public void execTask(DatasetTableTask datasetTableTask) throws Exception {
execNow(datasetTableTask);
if(datasetTableTask.getRate().equalsIgnoreCase(ScheduleType.SIMPLE.toString())){
//TODO add
scheduleService.addSchedule(datasetTableTask);
}
if (!datasetTableTask.getRate().equalsIgnoreCase(ScheduleType.SIMPLE.toString())) {
scheduleService.fireNow(datasetTableTask);
}

View File

@ -162,7 +162,7 @@
class="de-card-dropdown"
>
<template
v-if="!['Stopped', 'Exec'].includes(scope.row.status)"
v-if="!['Exec'].includes(scope.row.status)"
>
<el-dropdown-item
:disabled="disableExec(scope.row)"
@ -858,9 +858,7 @@ export default {
},
disableExec(task) {
return (
task.status === 'Stopped' ||
task.status === 'Pending' ||
task.rate === 'SIMPLE' ||
!hasDataPermission('manage', task.privileges)
)
},

View File

@ -268,7 +268,7 @@
class="de-card-dropdown"
>
<template
v-if="!['Stopped', 'Exec'].includes(scope.row.status)"
v-if="!['Exec'].includes(scope.row.status)"
>
<el-dropdown-item
:disabled="disableExec(scope.row)"
@ -624,10 +624,7 @@ export default {
)
},
disableExec(task) {
return (
task.status === 'Stopped' ||
task.status === 'Pending' ||
task.rate === 'SIMPLE' ||
return (task.status === 'Pending' ||
!hasDataPermission('manage', task.privileges)
)
},