use of org.embulk.spi.ExecSession in project embulk by embulk.
the class BulkLoader method cleanup.
public void cleanup(final ConfigSource config, final ResumeState resume) {
try {
ExecSession exec = ExecSession.builder(injector).fromExecConfig(resume.getExecSessionConfigSource()).build();
Exec.doWith(exec, new ExecAction<Void>() {
public Void run() {
try (SetCurrentThreadName dontCare = new SetCurrentThreadName("cleanup")) {
doCleanup(config, resume);
return null;
}
}
});
exec.cleanup();
} catch (ExecutionException ex) {
throw Throwables.propagate(ex.getCause());
}
}
Aggregations