-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support percent display show when dataX execution
- Loading branch information
1 parent
3ad6010
commit d228180
Showing
15 changed files
with
196 additions
and
782 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,21 +34,23 @@ | |
import com.qlangtech.tis.offline.DataxUtils; | ||
import com.qlangtech.tis.offline.module.action.OfflineDatasourceAction; | ||
import com.qlangtech.tis.order.center.IParamContext; | ||
import com.qlangtech.tis.realtime.yarn.rpc.SynResTarget; | ||
import com.qlangtech.tis.runtime.module.action.BasicModule; | ||
import com.qlangtech.tis.workflow.pojo.WorkFlowBuildHistory; | ||
import com.qlangtech.tis.workflow.pojo.WorkFlowBuildHistoryCriteria; | ||
import org.apache.commons.lang.StringUtils; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import java.util.Date; | ||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
/** | ||
* @author 百岁([email protected]) | ||
* @date 2017年9月30日 | ||
*/ | ||
public class FullbuildWorkflowAction extends BasicModule { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(FullbuildWorkflowAction.class); | ||
/** | ||
* | ||
*/ | ||
|
@@ -110,25 +112,36 @@ public void doCreateNewTask(Context context) { | |
*/ | ||
@Func(value = PermissionConstant.DATAFLOW_MANAGE, sideEffect = false) | ||
public void doGetLatestSuccessWorkflow(Context context) { | ||
String appName = this.getString(IFullBuildContext.KEY_APP_NAME); | ||
if (StringUtils.isEmpty(appName)) { | ||
throw new IllegalArgumentException("param appName can not be null"); | ||
} | ||
|
||
WorkFlowBuildHistoryCriteria historyCriteria = new WorkFlowBuildHistoryCriteria(); | ||
historyCriteria.setOrderByClause("id desc"); | ||
historyCriteria.createCriteria() | ||
.andAppNameEqualTo(appName).andStateEqualTo((byte) ExecResult.SUCCESS.getValue()); | ||
try { | ||
String appName = this.getString(IFullBuildContext.KEY_APP_NAME); | ||
if (StringUtils.isEmpty(appName)) { | ||
throw new IllegalArgumentException("param appName can not be null"); | ||
} | ||
|
||
List<WorkFlowBuildHistory> histories | ||
= this.getWorkflowDAOFacade().getWorkFlowBuildHistoryDAO().selectByExample(historyCriteria, 1, 1); | ||
|
||
for (WorkFlowBuildHistory buildHistory : histories) { | ||
this.setBizResult(context, buildHistory); | ||
return; | ||
WorkFlowBuildHistory latestSuccessWorkflowHistory = this.getLatestSuccessWorkflowHistory(SynResTarget.pipeline(appName)); | ||
if (latestSuccessWorkflowHistory != null) { | ||
this.setBizResult(context, latestSuccessWorkflowHistory); | ||
return; | ||
} | ||
this.addErrorMessage(context, "can not find build history by appname:" + appName); | ||
// WorkFlowBuildHistoryCriteria historyCriteria = new WorkFlowBuildHistoryCriteria(); | ||
// historyCriteria.setOrderByClause("id desc"); | ||
// historyCriteria.createCriteria() | ||
// .andAppNameEqualTo(appName).andStateEqualTo((byte) ExecResult.SUCCESS.getValue()); | ||
// | ||
// List<WorkFlowBuildHistory> histories | ||
// = this.getWorkflowDAOFacade().getWorkFlowBuildHistoryDAO().selectByExample(historyCriteria, 1, 1); | ||
// | ||
// for (WorkFlowBuildHistory buildHistory : histories) { | ||
// this.setBizResult(context, buildHistory); | ||
// return; | ||
// } | ||
|
||
|
||
} finally { | ||
// logger.info("doGetLatestSuccessWorkflow return "); | ||
} | ||
|
||
this.addErrorMessage(context, "can not find build history by appname:" + appName); | ||
} | ||
|
||
@Func(value = PermissionConstant.DATAFLOW_MANAGE, sideEffect = false) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.