本文整理了Java中com.netflix.conductor.common.metadata.tasks.Task.setUpdateTime()
方法的一些代码示例,展示了Task.setUpdateTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.setUpdateTime()
方法的具体详情如下:
包路径:com.netflix.conductor.common.metadata.tasks.Task
类名称:Task
方法名:setUpdateTime
暂无
代码示例来源: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
@Test
public void testIsResponsedTimeOut() {
TaskDef taskDef = new TaskDef();
taskDef.setName("test_rt");
taskDef.setResponseTimeoutSeconds(10);
Task task = new Task();
task.setTaskDefName("test_rt");
task.setStatus(Status.IN_PROGRESS);
task.setTaskId("aa");
task.setUpdateTime(System.currentTimeMillis() - TimeUnit.SECONDS.toMillis(11));
boolean flag = deciderService.isResponseTimedOut(taskDef, task);
assertNotNull(task);
assertTrue(flag);
}
代码示例来源: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
taskToBeScheduled.setUpdateTime(System.currentTimeMillis());
代码示例来源:origin: Netflix/conductor
taskToBeScheduled.setUpdateTime(System.currentTimeMillis());
代码示例来源:origin: Netflix/conductor
to.setStartTime( from.getStartTime() );
to.setEndTime( from.getEndTime() );
to.setUpdateTime( from.getUpdateTime() );
to.setStartDelayInSeconds( from.getStartDelayInSeconds() );
to.setRetriedTaskId( from.getRetriedTaskId() );
代码示例来源: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-grpc
to.setStartTime( from.getStartTime() );
to.setEndTime( from.getEndTime() );
to.setUpdateTime( from.getUpdateTime() );
to.setStartDelayInSeconds( from.getStartDelayInSeconds() );
to.setRetriedTaskId( from.getRetriedTaskId() );
内容来源于网络,如有侵权,请联系作者删除!