本文整理了Java中com.netflix.conductor.common.metadata.tasks.Task.getEndTime()
方法的一些代码示例,展示了Task.getEndTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getEndTime()
方法的具体详情如下:
包路径:com.netflix.conductor.common.metadata.tasks.Task
类名称:Task
方法名:getEndTime
暂无
代码示例来源:origin: Netflix/conductor
this.startTime = sdf.format(new Date(task.getStartTime()));
this.updateTime = sdf.format(new Date(task.getUpdateTime()));
this.endTime = sdf.format(new Date(task.getEndTime()));
this.status = task.getStatus();
this.reasonForIncompletion = task.getReasonForIncompletion();
if(task.getEndTime() > 0){
this.executionTime = task.getEndTime() - task.getStartTime();
代码示例来源:origin: Netflix/conductor
private long getTaskDuration(long s, Task task) {
long duration = task.getEndTime() - task.getStartTime();
s += duration;
if (task.getRetriedTaskId() == null) {
return s;
}
return s + getTaskDuration(s, executionDAOFacade.getTaskById(task.getRetriedTaskId()));
}
代码示例来源:origin: Netflix/conductor
taskParams.put("scheduledTime", task.getScheduledTime());
taskParams.put("startTime", task.getStartTime());
taskParams.put("endTime", task.getEndTime());
taskParams.put("workflowInstanceId", task.getWorkflowInstanceId());
taskParams.put("taskId", task.getTaskId());
代码示例来源:origin: Netflix/conductor
@Override
public void updateTask(Task task) {
try {
task.setUpdateTime(System.currentTimeMillis());
if (task.getStatus().isTerminal() && task.getEndTime() == 0) {
task.setEndTime(System.currentTimeMillis());
}
// TODO: calculate the shard number the task belongs to
String taskPayload = toJson(task);
recordCassandraDaoRequests("updateTask", task.getTaskType(), task.getWorkflowType());
recordCassandraDaoPayloadSize("updateTask", taskPayload.length(), task.getTaskType(), task.getWorkflowType());
session.execute(insertTaskStatement.bind(UUID.fromString(task.getWorkflowInstanceId()), DEFAULT_SHARD_ID, task.getTaskId(), taskPayload));
} catch (Exception e) {
Monitors.error(CLASS_NAME, "updateTask");
String errorMsg = String.format("Error updating task: %s in workflow: %s", task.getTaskId(), task.getWorkflowInstanceId());
LOGGER.error(errorMsg, e);
throw new ApplicationException(ApplicationException.Code.BACKEND_ERROR, errorMsg, e);
}
}
代码示例来源:origin: Netflix/conductor
private void updateTask(Connection connection, Task task) {
task.setUpdateTime(System.currentTimeMillis());
if (task.getStatus() != null && task.getStatus().isTerminal() && task.getEndTime() == 0) {
task.setEndTime(System.currentTimeMillis());
}
Optional<TaskDef> taskDefinition = task.getTaskDefinition();
if (taskDefinition.isPresent() && taskDefinition.get().concurrencyLimit() > 0) {
boolean inProgress = task.getStatus() != null && task.getStatus().equals(Task.Status.IN_PROGRESS);
updateInProgressStatus(connection, task, inProgress);
}
insertOrUpdateTaskData(connection, task);
if (task.getStatus() != null && task.getStatus().isTerminal()) {
removeTaskInProgress(connection, task);
}
addWorkflowToTaskMapping(connection, task);
}
代码示例来源:origin: Netflix/conductor
getScheduledTime() == task.getScheduledTime() &&
getStartTime() == task.getStartTime() &&
getEndTime() == task.getEndTime() &&
getUpdateTime() == task.getUpdateTime() &&
getStartDelayInSeconds() == task.getStartDelayInSeconds() &&
代码示例来源:origin: Netflix/conductor
@Override
public void updateTask(Task task) {
task.setUpdateTime(System.currentTimeMillis());
if (task.getStatus() != null && task.getStatus().isTerminal() && task.getEndTime() == 0) {
task.setEndTime(System.currentTimeMillis());
代码示例来源:origin: Netflix/conductor
@Override
public int hashCode() {
return Objects.hash(getTaskType(), getStatus(), getInputData(), getReferenceTaskName(), getRetryCount(), getSeq(), getCorrelationId(), getPollCount(), getTaskDefName(), getScheduledTime(), getStartTime(), getEndTime(), getUpdateTime(), getStartDelayInSeconds(), getRetriedTaskId(), isRetried(), isExecuted(), isCallbackFromWorker(), getResponseTimeoutSeconds(), getWorkflowInstanceId(), getWorkflowType(), getTaskId(), getReasonForIncompletion(), getCallbackAfterSeconds(), getWorkerId(), getOutputData(), getWorkflowTask(), getDomain(), getInputMessage(), getOutputMessage(), getRateLimitPerFrequency(), getRateLimitFrequencyInSeconds(), getExternalInputPayloadStoragePath(), getExternalOutputPayloadStoragePath());
}
}
代码示例来源:origin: Netflix/conductor
LOGGER.debug("Task: {} is in terminal state and is removed from the queue {} ", task, taskQueueName);
String msg = String.format("Task is already completed as %s@%d, workflow status=%s, workflowId=%s, taskId=%s",
task.getStatus(), task.getEndTime(), workflowInstance.getStatus(), workflowInstance.getWorkflowId(), task.getTaskId());
LOGGER.info(msg);
Monitors.recordUpdateConflict(task.getTaskType(), workflowInstance.getWorkflowName(), task.getStatus());
long lastDuration = task.getEndTime() - task.getStartTime();
Monitors.recordTaskExecutionTime(task.getTaskDefName(), duration, true, task.getStatus());
Monitors.recordTaskExecutionTime(task.getTaskDefName(), lastDuration, false, task.getStatus());
代码示例来源:origin: Netflix/conductor
to.setEndTime( from.getEndTime() );
to.setUpdateTime( from.getUpdateTime() );
to.setStartDelayInSeconds( from.getStartDelayInSeconds() );
代码示例来源:origin: com.netflix.conductor/conductor-common
this.startTime = sdf.format(new Date(task.getStartTime()));
this.updateTime = sdf.format(new Date(task.getUpdateTime()));
this.endTime = sdf.format(new Date(task.getEndTime()));
this.status = task.getStatus();
this.reasonForIncompletion = task.getReasonForIncompletion();
if(task.getEndTime() > 0){
this.executionTime = task.getEndTime() - task.getStartTime();
代码示例来源:origin: com.netflix.conductor/conductor-core
private long getTaskDuration(long s, Task task) {
long duration = task.getEndTime() - task.getStartTime();
s += duration;
if (task.getRetriedTaskId() == null) {
return s;
}
return s + getTaskDuration(s, executionDAOFacade.getTaskById(task.getRetriedTaskId()));
}
代码示例来源:origin: com.netflix.conductor/conductor-core
taskParams.put("scheduledTime", task.getScheduledTime());
taskParams.put("startTime", task.getStartTime());
taskParams.put("endTime", task.getEndTime());
taskParams.put("workflowInstanceId", task.getWorkflowInstanceId());
taskParams.put("taskId", task.getTaskId());
代码示例来源:origin: com.netflix.conductor/conductor-common
getScheduledTime() == task.getScheduledTime() &&
getStartTime() == task.getStartTime() &&
getEndTime() == task.getEndTime() &&
getUpdateTime() == task.getUpdateTime() &&
getStartDelayInSeconds() == task.getStartDelayInSeconds() &&
代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence
@Override
public void updateTask(Task task) {
task.setUpdateTime(System.currentTimeMillis());
if (task.getStatus() != null && task.getStatus().isTerminal() && task.getEndTime() == 0) {
task.setEndTime(System.currentTimeMillis());
代码示例来源:origin: com.netflix.conductor/conductor-common
@Override
public int hashCode() {
return Objects.hash(getTaskType(), getStatus(), getInputData(), getReferenceTaskName(), getRetryCount(), getSeq(), getCorrelationId(), getPollCount(), getTaskDefName(), getScheduledTime(), getStartTime(), getEndTime(), getUpdateTime(), getStartDelayInSeconds(), getRetriedTaskId(), isRetried(), isExecuted(), isCallbackFromWorker(), getResponseTimeoutSeconds(), getWorkflowInstanceId(), getWorkflowType(), getTaskId(), getReasonForIncompletion(), getCallbackAfterSeconds(), getWorkerId(), getOutputData(), getWorkflowTask(), getDomain(), getInputMessage(), getOutputMessage(), getRateLimitPerFrequency(), getRateLimitFrequencyInSeconds(), getExternalInputPayloadStoragePath(), getExternalOutputPayloadStoragePath());
}
}
代码示例来源:origin: com.netflix.conductor/conductor-core
LOGGER.debug("Task: {} is in terminal state and is removed from the queue {} ", task, taskQueueName);
String msg = String.format("Task is already completed as %s@%d, workflow status=%s, workflowId=%s, taskId=%s",
task.getStatus(), task.getEndTime(), workflowInstance.getStatus(), workflowInstance.getWorkflowId(), task.getTaskId());
LOGGER.info(msg);
Monitors.recordUpdateConflict(task.getTaskType(), workflowInstance.getWorkflowName(), task.getStatus());
long lastDuration = task.getEndTime() - task.getStartTime();
Monitors.recordTaskExecutionTime(task.getTaskDefName(), duration, true, task.getStatus());
Monitors.recordTaskExecutionTime(task.getTaskDefName(), lastDuration, false, task.getStatus());
代码示例来源:origin: com.netflix.conductor/conductor-grpc
to.setEndTime( from.getEndTime() );
to.setUpdateTime( from.getUpdateTime() );
to.setStartDelayInSeconds( from.getStartDelayInSeconds() );
内容来源于网络,如有侵权,请联系作者删除!