diff --git a/service/grails-app/services/org/olf/PackageIngestService.groovy b/service/grails-app/services/org/olf/PackageIngestService.groovy index 57a1fa67..78e574d9 100644 --- a/service/grails-app/services/org/olf/PackageIngestService.groovy +++ b/service/grails-app/services/org/olf/PackageIngestService.groovy @@ -137,14 +137,11 @@ class PackageIngestService implements DataBinder { // ENSURE MDC title is set as early as possible MDC.put('title', StringUtils.truncate(pc.title.toString())) - // log.debug("Try to resolve ${pc}") - try { PackageContentItem.withNewSession { tsess -> PackageContentItem.withNewTransaction { status -> // Delegate out to TitleIngestService so that any shared steps can move there. Map titleIngestResult = titleIngestService.upsertTitle(pc, kb, trustedSourceTI) - //log.debug("LOGDEBUG RESOLVED TITLE: ${titleIngestResult}") // titleIngestResult.titleInstanceId will be non-null IFF TitleIngestService managed to find a title with that Id. if ( titleIngestResult.titleInstanceId != null ) { // Pass off to new hierarchy method (?) @@ -292,7 +289,7 @@ class PackageIngestService implements DataBinder { public Pkg lookupPkgAndUpdate(PackageSchema package_data) { Pkg pkg = lookupPkg(package_data) Org vendor = getVendorFromPackageData(package_data) - // FIXME do update step but NOT create step + // Do update step but NOT create step if (pkg != null) { pkg.sourceDataUpdated = package_data.header.sourceDataUpdated @@ -510,7 +507,6 @@ class PackageIngestService implements DataBinder { } Platform platform = Platform.resolve(platform_url_to_use, pc.platformName) - // log.debug("Platform: ${platform}") if ( platform == null && PROXY_MISSING_PLATFORM ) { platform = Platform.resolve('http://localhost.localdomain', 'This platform entry is used for error cases') @@ -563,8 +559,6 @@ class PackageIngestService implements DataBinder { pciStatus: 'none' // This should be 'none', 'updated' or 'new' ] - // log.debug("platform ${pc.platformUrl} ${pc.platformName} (item URL is ${pc.url})") - // lets try and work out the platform for the item Platform platform = lookupOrCreatePlatform(pc); diff --git a/service/grails-app/services/org/olf/general/jobs/JobRunnerService.groovy b/service/grails-app/services/org/olf/general/jobs/JobRunnerService.groovy index 1e942784..8e7b0bcd 100644 --- a/service/grails-app/services/org/olf/general/jobs/JobRunnerService.groovy +++ b/service/grails-app/services/org/olf/general/jobs/JobRunnerService.groovy @@ -537,7 +537,6 @@ order by pj.dateCreated org.slf4j.MDC.clear() org.slf4j.MDC.setContextMap( jobId: '' + jid, tenantId: '' + tid, 'tenant': '' + tenantName) JobContext.current.set(new JobContext( jobId: jid, tenantId: tid )) - //log.debug("LOGDEBUG TID: ${tId}") Tenants.withId(tid) { beginJob(jid) } diff --git a/service/grails-app/services/org/olf/general/pushKB/PushKBService.groovy b/service/grails-app/services/org/olf/general/pushKB/PushKBService.groovy index 68078593..15070769 100644 --- a/service/grails-app/services/org/olf/general/pushKB/PushKBService.groovy +++ b/service/grails-app/services/org/olf/general/pushKB/PushKBService.groovy @@ -111,11 +111,9 @@ class PushKBService implements DataBinder { updatedAccessEnd: 0, ] KBIngressType ingressType = kbManagementBean.ingressType - //log.debug("pushPCIs (Service) called") if (ingressType == KBIngressType.PushKB) { try { pcis.each { Map record -> - //log.debug("PCI record: ${record}") // Handle MDC directly? Might not be the right approach MDC.put('title', StringUtils.truncate(record.title.toString())) @@ -130,11 +128,8 @@ class PushKBService implements DataBinder { pc.instanceMedium = 'Electronic' } - //log.debug("BeforeBind") bindData(pc, record) - //log.debug("AfterBind") if (utilityService.checkValidBinding(pc)) { - //log.debug("IsValid") try { Pkg pkg = null; Pkg.withSession { currentSess -> @@ -142,10 +137,8 @@ class PushKBService implements DataBinder { Pkg.withNewSession { newSess -> Pkg.withTransaction { // TODO this will allow the PCI data to update the PKG record... do we want this? - //log.debug("Before package look") pkg = packageIngestService.lookupOrCreatePackageFromTitle(pc); - //log.debug("LOGGING PACKAGE OBTAINED FROM PCI: ${pkg}") } newSess.clear() } @@ -157,10 +150,8 @@ class PushKBService implements DataBinder { TitleInstance.withNewSession { newSess -> TitleInstance.withTransaction { Map titleIngestResult = titleIngestService.upsertTitleDirect(pc) - //log.debug("LOGGING titleIngestResult: ${titleIngestResult}") if ( titleIngestResult.titleInstanceId != null ) { - //log.debug("Before lookupOrCreateTitleHierarchy") Map hierarchyResult = packageIngestService.lookupOrCreateTitleHierarchy( titleIngestResult.titleInstanceId, @@ -168,12 +159,11 @@ class PushKBService implements DataBinder { true, pc, result.updateTime, - result.titleCount // FIXME not sure about this + result.titleCount // Not totally sure this is valuable here ) PackageContentItem pci = PackageContentItem.get(hierarchyResult.pciId) packageIngestService.hierarchyResultMapLogic(hierarchyResult, result, pci) - //log.debug("After lookupOrCreateTitleHierarchy") /* TODO figure out if use of removedTimestamp * should be something harvest also needs to do directly @@ -208,7 +198,6 @@ class PushKBService implements DataBinder { String message = "Skipping \"${pc.title}\". System error: ${e.message}" log.error(message,e) } - //log.debug("Near end") // FIXME seems to be taking 0.1s from log.debug("After lookupOrCreateTitleHierarchy")??? result.titleCount++ @@ -239,7 +228,6 @@ class PushKBService implements DataBinder { result.errorMessage = "pushPCIs not valid when kbManagementBean is configured with type (${ingressType})" } - //log.debug("Before return") return result } }