Skip to content

Commit

Permalink
chore: Removed commented code
Browse files Browse the repository at this point in the history
Remove old commented out code
  • Loading branch information
EthanFreestone committed Oct 16, 2024
1 parent 1559ed5 commit a873a89
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class TitleIngestService implements DataBinder {
TitleInstance.withNewTransaction {
if (!kb) {
// This KB is created without a Type... so if it was trusted for TI data then it'd fail secondary enrichment
kb = new RemoteKB( name:remotekbname,
kb = new RemoteKB( name:remotekbname,
rectype: RemoteKB.RECTYPE_TITLE,
active: Boolean.TRUE,
readonly:readOnly,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,53 +200,6 @@ class PushKBService implements DataBinder {
}
}

// FIXME trying with aggressive session managemnet and clearing as in ingest service -- might not work
/* Pkg.withNewTransaction { status ->
// 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}")
Map titleIngestResult = titleIngestService.upsertTitleDirect(pc)
log.debug("LOGGING titleIngestResult: ${titleIngestResult}")
if ( titleIngestResult.titleInstanceId != null ) {
log.debug("Before lookupOrCreateTitleHierarchy")
Map hierarchyResult = packageIngestService.lookupOrCreateTitleHierarchy(
titleIngestResult.titleInstanceId,
pkg.id,
true,
pc,
result.updateTime,
result.titleCount // FIXME not sure about this
)
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
* And whether we should be doing it after all the above
* or before.
* /
if (pc.removedTimestamp) {
try {
log.debug("Removal candidate: pci.id #${pci.id} (Last seen ${pci.lastSeenTimestamp}, thisUpdate ${result.updateTime}) -- Set removed")
pci.removedTimestamp = pc.removedTimestamp
pci.save(failOnError:true)
} catch ( Exception e ) {
log.error("Problem removing ${pci} in package load", e)
}
result.removedTitles++
}
} else {
String message = "Skipping \"${pc.title}\". Unable to resolve title from ${pc.title} with identifiers ${pc.instanceIdentifiers}"
log.error(message)
}
} */
} catch ( IngestException ie ) {
// When we've caught an ingest exception, should have helpful error log message
String message = "Skipping \"${pc.title}\": ${ie.message}"
Expand Down

0 comments on commit a873a89

Please sign in to comment.