Skip to content

Commit

Permalink
Merge pull request #840 from folio-org/release/7.1.2
Browse files Browse the repository at this point in the history
Release 7.1.2
  • Loading branch information
Jack-Golding authored Nov 29, 2024
2 parents d5ef97a + dc4221a commit 3f4040f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 7.1.2
* ERM-3455 pushPkg endpoint in mod-agreements works unexpectedly slowly

## 7.1.1 2024-11-27
* ERM-3425: Missing interface dependencies in module descriptor in mod-agreements

Expand Down
2 changes: 1 addition & 1 deletion service/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ gormVersion=8.0.3

# Application
appName=mod-agreements
appVersion=7.1.1
appVersion=7.1.2
okapiInterfaceVersion=7.1
dockerTagSuffix=
dockerRepo=folioci
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ public class DependentModuleProxyService {
OkapiClient okapiClient

public Org coordinateOrg(String orgName) {

// Simply call the verb method on the client (get, post, put, delete). The client itself should take care of everything else.
// Get and Delete take the uri with optional params map for the query string.
// Post, Put and Patch take in the uri, data that can be converted to json (String or map) and optional params map for the query string.
Org org = Org.findByName(orgName)
Org org = Org.findByName(orgName) // This cannot be swapped for executeQuery SELECT -- possibly due to the bindUsingWhenRef

if (!org) {
log.debug "No local org for ${orgName}. Check vendors."
Expand All @@ -51,7 +50,7 @@ public class DependentModuleProxyService {
"first" : 0,
"last" : 0
}
*/
*/

switch (mod_vendor_lookup_result.total_records) {
case 1:
Expand All @@ -62,7 +61,7 @@ public class DependentModuleProxyService {
name: result.name,
orgsUuid: result.id,
sourceURI: "/vendor/${result.id}"
).save( flush:true, failOnError:true )
).save( flush: true, failOnError:true )
break

case 0:
Expand All @@ -74,7 +73,7 @@ public class DependentModuleProxyService {

// Create a new local one.
log.debug "No vendor found. Adding local org for ${orgName}"
org = (new Org(name:orgName)).save(flush:true, failOnError:true)
org = (new Org(name:orgName)).save( flush: true, failOnError:true )
break

default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,26 @@ class PushKBService implements DataBinder {
if (utilityService.checkValidBinding(package_data)) {

// Start a transaction -- method in packageIngestService needs this
Pkg.withNewTransaction { status ->
// Farm out package lookup and creation to a separate method

// These calls mirror what's in upsertPackage but conveniently avoid the
// logic which handles TIPPS
Pkg pkg = packageIngestService.lookupOrCreatePkg(package_data);
// Retain logging information
MDC.put('packageSource', pkg.source.toString())
MDC.put('packageReference', pkg.reference.toString())

// Update identifiers from citation
identifierService.updatePackageIdentifiers(pkg, package_data.identifiers)
Pkg.withSession { currentSess ->
Pkg.withTransaction {
Pkg.withNewSession { newSess ->
Pkg.withTransaction {
// Farm out package lookup and creation to a separate method

// These calls mirror what's in upsertPackage but conveniently avoid the
// logic which handles TIPPS
Pkg pkg = packageIngestService.lookupOrCreatePkg(package_data);
// Retain logging information
MDC.put('packageSource', pkg.source.toString())
MDC.put('packageReference', pkg.reference.toString())

// Update identifiers from citation
identifierService.updatePackageIdentifiers(pkg, package_data.identifiers)
}
newSess.clear()
}
}
}

}
}
result.success = true
Expand Down

0 comments on commit 3f4040f

Please sign in to comment.