File tree 1 file changed +6
-2
lines changed
src/clj/puppetlabs/services/jruby_pool_manager/impl
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 183
183
(throw (IllegalStateException.
184
184
(i18n/trs " There was a problem creating a JRubyInstance for the pool." )
185
185
e)))))
186
- cleanup-and-refill-tasks (for [[old-instance new-id] (zipmap old-instances new-instance-ids)]
186
+ [[first-old-inst first-new-id] & remaining] (zipmap old-instances new-instance-ids)
187
+ first-task [(fn [] (cleanup-and-refill-instance first-old-inst first-new-id))]
188
+ remaining-tasks (for [[old-instance new-id] remaining]
187
189
(fn [] (cleanup-and-refill-instance old-instance new-id)))]
188
- (execute-tasks! cleanup-and-refill-tasks creation-service))
190
+ (execute-tasks! first-task creation-service)
191
+ (when remaining-tasks
192
+ (execute-tasks! remaining-tasks creation-service)))
189
193
(if refill?
190
194
(log/info (i18n/trs " Finished draining and refilling pool." ))
191
195
(log/info (i18n/trs " Finished draining pool." ))))
You can’t perform that action at this time.
0 commit comments