Skip to content

Commit ef6a947

Browse files
committed
(PE-37376) Refactor instance-creation-concurrency default, set to 3
1 parent b151955 commit ef6a947

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/clj/puppetlabs/services/jruby_pool_manager/impl/jruby_internal.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
[config :- jruby-schemas/JRubyConfig]
185185
(let [multithreaded (:multithreaded config)
186186
size (:max-active-instances config)
187-
creation-concurrency (get config :instance-creation-concurrency 4)
187+
creation-concurrency (:instance-creation-concurrency config)
188188
creation-service (Executors/newFixedThreadPool creation-concurrency)]
189189
(if multithreaded
190190
{:pool (instantiate-reference-pool size)

src/clj/puppetlabs/services/jruby_pool_manager/jruby_core.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
(update-in [:environment-vars] #(or % {}))
175175
(update-in [:lifecycle] initialize-lifecycle-fns)
176176
(update-in [:multithreaded] #(if (nil? %) false %))
177+
(update-in [:instance-creation-concurrency] #(if (nil? %) 3 %))
177178
jruby-internal/initialize-gem-path))
178179

179180
(schema/defn register-event-handler

src/clj/puppetlabs/services/jruby_pool_manager/jruby_schemas.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
:profiling-mode SupportedJRubyProfilingModes
9696
:profiler-output-file schema/Str
9797
:multithreaded schema/Bool
98-
(schema/optional-key :instance-creation-concurrency) schema/Int})
98+
:instance-creation-concurrency schema/Int})
9999

100100
(def JRubyPoolAgent
101101
"An agent configured for use in managing JRuby pools"

0 commit comments

Comments
 (0)