Search in sources :

Example 1 with GetJsonReportResultTask

use of com.github.diegopacheco.dynomite.cluster.checker.tasks.GetJsonReportResultTask in project dynomite-cluster-checker by diegopacheco.

the class DCCTaskExecutionEngine method run.

@SuppressWarnings("unchecked")
public String run(String seeds, boolean telemetryMode) {
    ExecutionContext ec = injector.getInstance(ExecutionContext.class);
    Chronometer stopWatch = injector.getInstance(Chronometer.class);
    stopWatch.start();
    ec.setRawSeeds(seeds);
    ec.setIsTelemetryMode(telemetryMode);
    List<Task> tasks = injector.getInstance(Key.get(List.class, Names.named("tasks")));
    for (Task t : tasks) {
        t.execute(ec);
    }
    stopWatch.stop();
    ec.getExecutionReport().setTimeToRun(stopWatch.getDiffAsString());
    GetJsonReportResultTask jsonFinalReportTask = injector.getInstance(GetJsonReportResultTask.class);
    jsonFinalReportTask.execute(ec);
    return ec.getExecutionReport().getJsonResult();
}
Also used : GetJsonReportResultTask(com.github.diegopacheco.dynomite.cluster.checker.tasks.GetJsonReportResultTask) Task(com.github.diegopacheco.dynomite.cluster.checker.tasks.Task) ExecutionContext(com.github.diegopacheco.dynomite.cluster.checker.context.ExecutionContext) Chronometer(com.github.diegopacheco.dynomite.cluster.checker.util.Chronometer) List(java.util.List) GetJsonReportResultTask(com.github.diegopacheco.dynomite.cluster.checker.tasks.GetJsonReportResultTask)

Aggregations

ExecutionContext (com.github.diegopacheco.dynomite.cluster.checker.context.ExecutionContext)1 GetJsonReportResultTask (com.github.diegopacheco.dynomite.cluster.checker.tasks.GetJsonReportResultTask)1 Task (com.github.diegopacheco.dynomite.cluster.checker.tasks.Task)1 Chronometer (com.github.diegopacheco.dynomite.cluster.checker.util.Chronometer)1 List (java.util.List)1