use of org.jboss.pnc.common.logging.BuildTaskContext in project pnc by project-ncl.
the class BuildExecutorTriggerer method getMdcMeta.
public Optional<BuildTaskContext> getMdcMeta(String buildExecutionConfigId, String userId) {
BuildExecutionSession runningExecution = buildExecutor.getRunningExecution(buildExecutionConfigId);
if (runningExecution != null) {
BuildExecutionConfiguration buildExecutionConfiguration = runningExecution.getBuildExecutionConfiguration();
boolean temporaryBuild = buildExecutionConfiguration.isTempBuild();
return Optional.of(new BuildTaskContext(buildExecutionConfiguration.getBuildContentId(), userId, temporaryBuild, ExpiresDate.getTemporaryBuildExpireDate(systemConfig.getTemporaryBuildsLifeSpan(), temporaryBuild)));
} else {
return Optional.empty();
}
}
Aggregations