use of org.finos.legend.sdlc.server.tools.BackgroundTaskProcessor in project legend-sdlc by finos.
the class AbstractGitLabApiTest method suiteSetup.
@BeforeClass
public static void suiteSetup() {
JerseyGuiceUtils.install((s, serviceLocator) -> null);
backgroundTaskProcessor = new BackgroundTaskProcessor(1);
prepareGitLabUser();
}
use of org.finos.legend.sdlc.server.tools.BackgroundTaskProcessor in project legend-sdlc by finos.
the class BaseLegendSDLCServer method run.
@Override
public void run(T configuration, Environment environment) {
super.run(configuration, environment);
LifecycleEnvironment lifecycleEnvironment = environment.lifecycle();
LOGGER.debug("Creating background task processor");
BackgroundTaskProcessor taskProcessor = new BackgroundTaskProcessor(1);
lifecycleEnvironment.manage(new Managed() {
@Override
public void start() {
// nothing to do
}
@Override
public void stop() throws Exception {
LOGGER.debug("Shutting down background task processor");
taskProcessor.shutdown();
if (taskProcessor.awaitTermination(30, TimeUnit.SECONDS)) {
LOGGER.debug("Done shutting down background task processor");
} else {
LOGGER.debug("Background task processor did not terminate within the timeout");
}
}
});
this.backgroundTaskProcessor = taskProcessor;
}
use of org.finos.legend.sdlc.server.tools.BackgroundTaskProcessor in project legend-sdlc by finos.
the class AbstractGitLabServerApiTest method suiteSetup.
@BeforeClass
public static void suiteSetup() {
JerseyGuiceUtils.install((s, serviceLocator) -> null);
backgroundTaskProcessor = new BackgroundTaskProcessor(1);
}
Aggregations