本文整理了Java中com.netflix.conductor.common.metadata.tasks.Task.setCallbackAfterSeconds()
方法的一些代码示例,展示了Task.setCallbackAfterSeconds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.setCallbackAfterSeconds()
方法的具体详情如下:
包路径:com.netflix.conductor.common.metadata.tasks.Task
类名称:Task
方法名:setCallbackAfterSeconds
暂无
代码示例来源:origin: Netflix/conductor
Monitors.recordQueueWaitTime(task.getTaskDefName(), task.getQueueWaitTime());
task.setCallbackAfterSeconds(0); // reset callbackAfterSeconds when giving the task to the worker
task.setWorkerId(workerId);
task.setPollCount(task.getPollCount() + 1);
代码示例来源:origin: Netflix/conductor
userDefinedTask.setStatus(Task.Status.SCHEDULED);
userDefinedTask.setRetryCount(retryCount);
userDefinedTask.setCallbackAfterSeconds(taskToSchedule.getStartDelay());
userDefinedTask.setWorkflowTask(taskToSchedule);
userDefinedTask.setRateLimitPerFrequency(taskDefinition.getRateLimitPerFrequency());
代码示例来源:origin: Netflix/conductor
/**
* Reschedule a task
*
* @param task failed or cancelled task
* @return new instance of a task with "SCHEDULED" status
*/
private Task taskToBeRescheduled(Task task) {
Task taskToBeRetried = task.copy();
taskToBeRetried.setTaskId(IDGenerator.generate());
taskToBeRetried.setRetriedTaskId(task.getTaskId());
taskToBeRetried.setStatus(SCHEDULED);
taskToBeRetried.setRetryCount(task.getRetryCount() + 1);
taskToBeRetried.setRetried(false);
taskToBeRetried.setPollCount(0);
taskToBeRetried.setCallbackAfterSeconds(0);
task.setRetried(true);
return taskToBeRetried;
}
代码示例来源:origin: Netflix/conductor
httpTask.setStatus(Task.Status.SCHEDULED);
httpTask.setRetryCount(retryCount);
httpTask.setCallbackAfterSeconds(taskToSchedule.getStartDelay());
httpTask.setWorkflowTask(taskToSchedule);
httpTask.setRateLimitPerFrequency(taskDefinition.getRateLimitPerFrequency());
代码示例来源:origin: Netflix/conductor
simpleTask.setScheduledTime(System.currentTimeMillis());
simpleTask.setRetryCount(retryCount);
simpleTask.setCallbackAfterSeconds(taskToSchedule.getStartDelay());
simpleTask.setResponseTimeoutSeconds(taskDefinition.getResponseTimeoutSeconds());
simpleTask.setWorkflowTask(taskToSchedule);
代码示例来源:origin: Netflix/conductor
/**
* @param workflowId the id of the workflow for which callbacks are to be reset
* @throws ApplicationException if the workflow is in terminal state
*/
public void resetCallbacksForInProgressTasks(String workflowId) {
Workflow workflow = executionDAOFacade.getWorkflowById(workflowId, true);
if (workflow.getStatus().isTerminal()) {
throw new ApplicationException(CONFLICT, "Workflow is in terminal state. Status =" + workflow.getStatus());
}
// Get tasks that are in progress and have callbackAfterSeconds > 0
// and set the callbackAfterSeconds to 0;
for (Task task : workflow.getTasks()) {
if (task.getStatus().equals(IN_PROGRESS) &&
task.getCallbackAfterSeconds() > 0) {
if (queueDAO.setOffsetTime(QueueUtils.getQueueName(task), task.getTaskId(), 0)) {
task.setCallbackAfterSeconds(0);
executionDAOFacade.updateTask(task);
}
}
}
}
代码示例来源:origin: Netflix/conductor
task.setCallbackAfterSeconds(unackTimeout);
代码示例来源:origin: Netflix/conductor
rescheduled.setCallbackAfterSeconds(startDelay);
rescheduled.setRetryCount(task.getRetryCount() + 1);
rescheduled.setRetried(false);
代码示例来源:origin: Netflix/conductor
to.setTaskId( from.getTaskId() );
to.setReasonForIncompletion( from.getReasonForIncompletion() );
to.setCallbackAfterSeconds( from.getCallbackAfterSeconds() );
to.setWorkerId( from.getWorkerId() );
Map<String, Object> outputDataMap = new HashMap<String, Object>();
代码示例来源:origin: Netflix/conductor
task1.setStatus(Status.SCHEDULED);
task1.setRetryCount(0);
task1.setCallbackAfterSeconds(taskToSchedule.getStartDelay());
task1.setWorkflowTask(taskToSchedule);
task3.setStatus(Status.SCHEDULED);
task3.setRetryCount(0);
task3.setCallbackAfterSeconds(taskToSchedule.getStartDelay());
task3.setWorkflowTask(taskToSchedule);
代码示例来源:origin: Netflix/conductor
dynamicTask.setScheduledTime(System.currentTimeMillis());
dynamicTask.setRetryCount(retryCount);
dynamicTask.setCallbackAfterSeconds(taskToSchedule.getStartDelay());
dynamicTask.setResponseTimeoutSeconds(taskDefinition.getResponseTimeoutSeconds());
dynamicTask.setWorkflowTask(taskToSchedule);
代码示例来源:origin: Netflix/conductor
task.setReasonForIncompletion(taskResult.getReasonForIncompletion());
task.setWorkerId(taskResult.getWorkerId());
task.setCallbackAfterSeconds(taskResult.getCallbackAfterSeconds());
代码示例来源:origin: Netflix/conductor
task.getOutputData().put("op", task1Output);
task.setStatus(IN_PROGRESS);
task.setCallbackAfterSeconds(5);
workflowExecutionService.updateTask(task);
String taskId = task.getTaskId();
代码示例来源:origin: Netflix/conductor
public Task copy() {
Task copy = new Task();
copy.setCallbackAfterSeconds(callbackAfterSeconds);
copy.setCallbackFromWorker(callbackFromWorker);
copy.setCorrelationId(correlationId);
copy.setInputData(inputData);
copy.setOutputData(outputData);
copy.setReferenceTaskName(referenceTaskName);
copy.setStartDelayInSeconds(startDelayInSeconds);
copy.setTaskDefName(taskDefName);
copy.setTaskType(taskType);
copy.setWorkflowInstanceId(workflowInstanceId);
copy.setWorkflowType(workflowType);
copy.setResponseTimeoutSeconds(responseTimeoutSeconds);
copy.setStatus(status);
copy.setRetryCount(retryCount);
copy.setPollCount(pollCount);
copy.setTaskId(taskId);
copy.setWorkflowTask(workflowTask);
copy.setDomain(domain);
copy.setInputMessage(inputMessage);
copy.setOutputMessage(outputMessage);
copy.setRateLimitPerFrequency(rateLimitPerFrequency);
copy.setRateLimitFrequencyInSeconds(rateLimitFrequencyInSeconds);
copy.setExternalInputPayloadStoragePath(externalInputPayloadStoragePath);
copy.setExternalOutputPayloadStoragePath(externalOutputPayloadStoragePath);
return copy;
}
代码示例来源:origin: Netflix/conductor
task.getOutputData().put("op", task1Op);
task.setStatus(IN_PROGRESS);
task.setCallbackAfterSeconds(3600);
workflowExecutionService.updateTask(task);
String taskId = task.getTaskId();
代码示例来源:origin: Netflix/conductor
taskAgain.setCallbackAfterSeconds(20);
workflowExecutionService.updateTask(taskAgain);
代码示例来源:origin: Netflix/conductor
task.setCallbackAfterSeconds(5L);
workflowExecutionService.updateTask(task);
task.setCallbackAfterSeconds(5L);
workflowExecutionService.updateTask(task);
代码示例来源:origin: com.netflix.conductor/conductor-core
/**
* Reschedule a task
*
* @param task failed or cancelled task
* @return new instance of a task with "SCHEDULED" status
*/
private Task taskToBeRescheduled(Task task) {
Task taskToBeRetried = task.copy();
taskToBeRetried.setTaskId(IDGenerator.generate());
taskToBeRetried.setRetriedTaskId(task.getTaskId());
taskToBeRetried.setStatus(SCHEDULED);
taskToBeRetried.setRetryCount(task.getRetryCount() + 1);
taskToBeRetried.setRetried(false);
taskToBeRetried.setPollCount(0);
taskToBeRetried.setCallbackAfterSeconds(0);
task.setRetried(true);
return taskToBeRetried;
}
代码示例来源:origin: com.netflix.conductor/conductor-core
/**
* @param workflowId the id of the workflow for which callbacks are to be reset
* @throws ApplicationException if the workflow is in terminal state
*/
public void resetCallbacksForInProgressTasks(String workflowId) {
Workflow workflow = executionDAOFacade.getWorkflowById(workflowId, true);
if (workflow.getStatus().isTerminal()) {
throw new ApplicationException(CONFLICT, "Workflow is in terminal state. Status =" + workflow.getStatus());
}
// Get tasks that are in progress and have callbackAfterSeconds > 0
// and set the callbackAfterSeconds to 0;
for (Task task : workflow.getTasks()) {
if (task.getStatus().equals(IN_PROGRESS) &&
task.getCallbackAfterSeconds() > 0) {
if (queueDAO.setOffsetTime(QueueUtils.getQueueName(task), task.getTaskId(), 0)) {
task.setCallbackAfterSeconds(0);
executionDAOFacade.updateTask(task);
}
}
}
}
代码示例来源:origin: com.netflix.conductor/conductor-common
public Task copy() {
Task copy = new Task();
copy.setCallbackAfterSeconds(callbackAfterSeconds);
copy.setCallbackFromWorker(callbackFromWorker);
copy.setCorrelationId(correlationId);
copy.setInputData(inputData);
copy.setOutputData(outputData);
copy.setReferenceTaskName(referenceTaskName);
copy.setStartDelayInSeconds(startDelayInSeconds);
copy.setTaskDefName(taskDefName);
copy.setTaskType(taskType);
copy.setWorkflowInstanceId(workflowInstanceId);
copy.setWorkflowType(workflowType);
copy.setResponseTimeoutSeconds(responseTimeoutSeconds);
copy.setStatus(status);
copy.setRetryCount(retryCount);
copy.setPollCount(pollCount);
copy.setTaskId(taskId);
copy.setWorkflowTask(workflowTask);
copy.setDomain(domain);
copy.setInputMessage(inputMessage);
copy.setOutputMessage(outputMessage);
copy.setRateLimitPerFrequency(rateLimitPerFrequency);
copy.setRateLimitFrequencyInSeconds(rateLimitFrequencyInSeconds);
copy.setExternalInputPayloadStoragePath(externalInputPayloadStoragePath);
copy.setExternalOutputPayloadStoragePath(externalOutputPayloadStoragePath);
return copy;
}
内容来源于网络,如有侵权,请联系作者删除!