use of com.netflix.conductor.client.automator.TaskRunnerConfigurer in project conductor by Netflix.
the class Main method main.
public static void main(String[] args) {
TaskClient taskClient = new TaskClient();
// Point this to the server API
taskClient.setRootURI("http://localhost:8080/api/");
// number of threads used to execute workers. To avoid starvation, should be same or more than number of workers
int threadCount = 2;
Worker worker1 = new SampleWorker("task_1");
Worker worker2 = new SampleWorker("task_5");
// Create TaskRunnerConfigurer
TaskRunnerConfigurer configurer = new TaskRunnerConfigurer.Builder(taskClient, Arrays.asList(worker1, worker2)).withThreadCount(threadCount).build();
// Start the polling and execution of tasks
configurer.init();
}
Aggregations