Skip to content

Commit

Permalink
Merge pull request #829 from folio-org/release_7.0.9
Browse files Browse the repository at this point in the history
Release 7.0.9
  • Loading branch information
EthanFreestone authored Oct 18, 2024
2 parents bf2f195 + a9fe9a6 commit 137aef6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 7.0.9 2024-10-18
* Fixed problem with concurrentJobsGlobal not actually reading from environment variable

## 7.0.8 2024-09-09
* ERM-3321 Description can be too long for index, causing mod-agreements error when updating from 6.0.x to later versions or failure on saving agreements with a long description
* Swap basic GIN indices for GIN indices with trigram operator where they're not already set.
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.0.8
appVersion=7.0.9
dockerTagSuffix=
dockerRepo=folioci

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,21 @@ order by pj.dateCreated
@PostConstruct
void init() {
// Set up the Executor
if ( grailsApplication.config.concurrentJobsGlobal instanceof Integer && grailsApplication.config.concurrentJobsGlobal > 0 )
CONCURRENT_JOBS_GLOBAL = grailsApplication.config.concurrentJobsGlobal;
try {
def concurrentJobsGlobalConfig = grailsApplication.config.getProperty('concurrentJobsGlobal', int);
if (concurrentJobsGlobalConfig > 0) {
CONCURRENT_JOBS_GLOBAL = concurrentJobsGlobalConfig;
}
} catch (Exception e) {
log.error("Failed to read concurrentJobsGlobal from config: ${e}")
}

log.info("Configured jobConcurrency: ${CONCURRENT_JOBS_GLOBAL}")
// Base the number of small jobs executable on the limit imposed on the default runner.
taskConcurrency = CONCURRENT_JOBS_GLOBAL * 2

// SO: This is not ideal. We don't want to limit jobs globally to 1 ideally. It should be
log.info("Configured taskConcurrency: ${taskConcurrency}")

// SO: This is not ideal. We don't want to limit jobs globally to 1 ideally. It should be
// 1 per tenant, but that will involve implementing custom handling for the queue and executor.
// While we only have 1 tenant, this will suffice.
executorSvc = new ThreadPoolExecutor(
Expand All @@ -111,7 +119,7 @@ order by pj.dateCreated
5,
TimeUnit.SECONDS, // Makes the above wait time in 'seconds'
new LinkedBlockingQueue<Runnable>() // Blocking queue
)
)

// Raise an event to say we are ready.
notify('jobs:job_runner_ready')
Expand Down

0 comments on commit 137aef6

Please sign in to comment.