use of com.b2international.snowowl.core.jobs.RemoteJobTracker in project snow-owl by b2ihealthcare.
the class RepositoryPlugin method initializeJobSupport.
private void initializeJobSupport(Environment env, SnowOwlConfiguration configuration) {
final ObjectMapper objectMapper = env.service(ObjectMapper.class);
final Index jobsIndex = Indexes.createIndex(JOBS_INDEX, objectMapper, new Mappings(RemoteJobEntry.class), env.service(IndexSettings.class).forIndex(env.service(RepositoryConfiguration.class).getIndexConfiguration(), JOBS_INDEX));
// TODO make this configurable
final long defaultJobCleanUpInterval = TimeUnit.MINUTES.toMillis(1);
env.services().registerService(RemoteJobTracker.class, new RemoteJobTracker(jobsIndex, env.service(IEventBus.class), objectMapper, defaultJobCleanUpInterval));
}
Aggregations