use of teammates.logic.core.TaskQueuesLogic in project teammates by TEAMMATES.
the class TaskQueuer method addDeferredTask.
protected void addDeferredTask(String queueName, String workerUrl, Map<String, String> paramMap, long countdownTime) {
Map<String, String[]> multisetParamMap = new HashMap<>();
paramMap.forEach((key, value) -> multisetParamMap.put(key, new String[] { value }));
TaskWrapper task = new TaskWrapper(queueName, workerUrl, multisetParamMap);
new TaskQueuesLogic().addDeferredTask(task, countdownTime);
}
use of teammates.logic.core.TaskQueuesLogic in project teammates by TEAMMATES.
the class TaskQueuer method addTaskMultisetParam.
protected void addTaskMultisetParam(String queueName, String workerUrl, Map<String, String[]> paramMap) {
TaskWrapper task = new TaskWrapper(queueName, workerUrl, paramMap);
new TaskQueuesLogic().addTask(task);
}
use of teammates.logic.core.TaskQueuesLogic in project teammates by TEAMMATES.
the class TaskQueuer method addTask.
// The following methods are facades to the actual logic for adding tasks to the queue.
// Using this method, the actual logic can still be black-boxed
// while at the same time allowing this API to be mocked during test.
protected void addTask(String queueName, String workerUrl, Map<String, String> paramMap) {
Map<String, String[]> multisetParamMap = new HashMap<>();
paramMap.forEach((key, value) -> multisetParamMap.put(key, new String[] { value }));
TaskWrapper task = new TaskWrapper(queueName, workerUrl, multisetParamMap);
new TaskQueuesLogic().addTask(task);
}
Aggregations