Slideee commented on code in PR #423:
URL: https://github.com/apache/rocketmq-connect/pull/423#discussion_r1121013748
##########
rocketmq-connect-runtime/src/main/java/org/apache/rocketmq/connect/runtime/connectorwrapper/Worker.java:
##########
@@ -900,6 +910,21 @@ private void startTask(Map<String, List<ConnectKeyValue>>
newTasks) throws Excep
}
}
+ private void redressRunningStatus(WorkerTask workerTask) {
+ TaskStatus taskStatus = stateManagementService.get(workerTask.id);
+ if (taskStatus != null && taskStatus.getState() != RUNNING &&
taskStatus.getState() != PAUSED) {
+ ConnectorStatus connectorStatus =
stateManagementService.get(workerTask.id.connector());
+ TaskStatus newTaskStatus;
+ if (null != connectorStatus && connectorStatus.getState() ==
PAUSED) {
+ newTaskStatus = new TaskStatus(workerTask.id, PAUSED,
workerConfig.getWorkerId(), System.currentTimeMillis());
+ } else {
+ newTaskStatus = new TaskStatus(workerTask.id, RUNNING,
workerConfig.getWorkerId(), System.currentTimeMillis());
Review Comment:
WorkerConnector seems to have a problem with the need for state error
correction logic?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]