com.netflix.conductor.common.metadata.tasks.Task.getStartTime()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(82)

本文整理了Java中com.netflix.conductor.common.metadata.tasks.Task.getStartTime()方法的一些代码示例,展示了Task.getStartTime()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getStartTime()方法的具体详情如下:
包路径:com.netflix.conductor.common.metadata.tasks.Task
类名称:Task
方法名:getStartTime

Task.getStartTime介绍

暂无

代码示例

代码示例来源:origin: Netflix/conductor

this.correlationId = task.getCorrelationId();
this.scheduledTime = sdf.format(new Date(task.getScheduledTime()));
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.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("taskDefName", task.getTaskDefName());
taskParams.put("scheduledTime", task.getScheduledTime());
taskParams.put("startTime", task.getStartTime());
taskParams.put("endTime", task.getEndTime());
taskParams.put("workflowInstanceId", task.getWorkflowInstanceId());

代码示例来源:origin: Netflix/conductor

getPollCount() == task.getPollCount() &&
getScheduledTime() == task.getScheduledTime() &&
getStartTime() == task.getStartTime() &&
getEndTime() == task.getEndTime() &&
getUpdateTime() == task.getUpdateTime() &&

代码示例来源:origin: Netflix/conductor

@VisibleForTesting
void checkForTimeout(TaskDef taskDef, Task task) {
  if (taskDef == null) {
    LOGGER.warn("missing task type " + task.getTaskDefName() + ", workflowId=" + task.getWorkflowInstanceId());
    return;
  }
  if (task.getStatus().isTerminal() || taskDef.getTimeoutSeconds() <= 0 || !task.getStatus().equals(IN_PROGRESS)) {
    return;
  }
  long timeout = 1000L * taskDef.getTimeoutSeconds();
  long now = System.currentTimeMillis();
  long elapsedTime = now - (task.getStartTime() + ((long) task.getStartDelayInSeconds() * 1000L));
  if (elapsedTime < timeout) {
    return;
  }
  String reason = "Task timed out after " + elapsedTime + " millisecond.  Timeout configured as " + timeout;
  Monitors.recordTaskTimeout(task.getTaskDefName());
  switch (taskDef.getTimeoutPolicy()) {
    case ALERT_ONLY:
      return;
    case RETRY:
      task.setStatus(TIMED_OUT);
      task.setReasonForIncompletion(reason);
      return;
    case TIME_OUT_WF:
      task.setStatus(TIMED_OUT);
      task.setReasonForIncompletion(reason);
      throw new TerminateWorkflowException(reason, WorkflowStatus.TIMED_OUT, task);
  }
}

代码示例来源:origin: Netflix/conductor

if (task.getStartTime() == 0) {
  task.setStartTime(System.currentTimeMillis());
  Monitors.recordQueueWaitTime(task.getTaskDefName(), task.getQueueWaitTime());

代码示例来源:origin: Netflix/conductor

Workflow workflow = executionDAOFacade.getWorkflowById(workflowId, true);
if (task.getStartTime() == 0) {
  task.setStartTime(System.currentTimeMillis());
  Monitors.recordQueueWaitTime(task.getTaskDefName(), task.getQueueWaitTime());

代码示例来源: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

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.setStartTime( from.getStartTime() );
to.setEndTime( from.getEndTime() );
to.setUpdateTime( from.getUpdateTime() );

代码示例来源:origin: com.netflix.conductor/conductor-common

this.correlationId = task.getCorrelationId();
this.scheduledTime = sdf.format(new Date(task.getScheduledTime()));
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.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("taskDefName", task.getTaskDefName());
taskParams.put("scheduledTime", task.getScheduledTime());
taskParams.put("startTime", task.getStartTime());
taskParams.put("endTime", task.getEndTime());
taskParams.put("workflowInstanceId", task.getWorkflowInstanceId());

代码示例来源:origin: com.netflix.conductor/conductor-common

getPollCount() == task.getPollCount() &&
getScheduledTime() == task.getScheduledTime() &&
getStartTime() == task.getStartTime() &&
getEndTime() == task.getEndTime() &&
getUpdateTime() == task.getUpdateTime() &&

代码示例来源:origin: com.netflix.conductor/conductor-core

@VisibleForTesting
void checkForTimeout(TaskDef taskDef, Task task) {
  if (taskDef == null) {
    LOGGER.warn("missing task type " + task.getTaskDefName() + ", workflowId=" + task.getWorkflowInstanceId());
    return;
  }
  if (task.getStatus().isTerminal() || taskDef.getTimeoutSeconds() <= 0 || !task.getStatus().equals(IN_PROGRESS)) {
    return;
  }
  long timeout = 1000L * taskDef.getTimeoutSeconds();
  long now = System.currentTimeMillis();
  long elapsedTime = now - (task.getStartTime() + ((long) task.getStartDelayInSeconds() * 1000L));
  if (elapsedTime < timeout) {
    return;
  }
  String reason = "Task timed out after " + elapsedTime + " millisecond.  Timeout configured as " + timeout;
  Monitors.recordTaskTimeout(task.getTaskDefName());
  switch (taskDef.getTimeoutPolicy()) {
    case ALERT_ONLY:
      return;
    case RETRY:
      task.setStatus(TIMED_OUT);
      task.setReasonForIncompletion(reason);
      return;
    case TIME_OUT_WF:
      task.setStatus(TIMED_OUT);
      task.setReasonForIncompletion(reason);
      throw new TerminateWorkflowException(reason, WorkflowStatus.TIMED_OUT, task);
  }
}

代码示例来源:origin: com.netflix.conductor/conductor-core

if (task.getStartTime() == 0) {
  task.setStartTime(System.currentTimeMillis());
  Monitors.recordQueueWaitTime(task.getTaskDefName(), task.getQueueWaitTime());

代码示例来源:origin: com.netflix.conductor/conductor-core

Workflow workflow = executionDAOFacade.getWorkflowById(workflowId, true);
if (task.getStartTime() == 0) {
  task.setStartTime(System.currentTimeMillis());
  Monitors.recordQueueWaitTime(task.getTaskDefName(), task.getQueueWaitTime());

代码示例来源: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

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.setStartTime( from.getStartTime() );
to.setEndTime( from.getEndTime() );
to.setUpdateTime( from.getUpdateTime() );

相关文章

Task类方法