本文整理了Java中com.netflix.conductor.common.metadata.tasks.Task.getStartDelayInSeconds()
方法的一些代码示例,展示了Task.getStartDelayInSeconds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getStartDelayInSeconds()
方法的具体详情如下:
包路径:com.netflix.conductor.common.metadata.tasks.Task
类名称:Task
方法名:getStartDelayInSeconds
暂无
代码示例来源:origin: Netflix/conductor
getEndTime() == task.getEndTime() &&
getUpdateTime() == task.getUpdateTime() &&
getStartDelayInSeconds() == task.getStartDelayInSeconds() &&
isRetried() == task.isRetried() &&
isExecuted() == task.isExecuted() &&
代码示例来源: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
@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
to.setEndTime( from.getEndTime() );
to.setUpdateTime( from.getUpdateTime() );
to.setStartDelayInSeconds( from.getStartDelayInSeconds() );
if (from.getRetriedTaskId() != null) {
to.setRetriedTaskId( from.getRetriedTaskId() );
代码示例来源:origin: com.netflix.conductor/conductor-common
getEndTime() == task.getEndTime() &&
getUpdateTime() == task.getUpdateTime() &&
getStartDelayInSeconds() == task.getStartDelayInSeconds() &&
isRetried() == task.isRetried() &&
isExecuted() == task.isExecuted() &&
代码示例来源: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-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-grpc
to.setEndTime( from.getEndTime() );
to.setUpdateTime( from.getUpdateTime() );
to.setStartDelayInSeconds( from.getStartDelayInSeconds() );
if (from.getRetriedTaskId() != null) {
to.setRetriedTaskId( from.getRetriedTaskId() );
内容来源于网络,如有侵权,请联系作者删除!