-
Notifications
You must be signed in to change notification settings - Fork 22
(TK-376) Add :internal key to pool context and instance #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(TK-376) Add :internal key to pool context and instance #13
Conversation
Both the pool context and the instance contain keys that we don't want users to mess with - such as the pool and flush agents and the `flush-instance-fn`. This commit moves all keys we want to keep "private" in both the pool context and the instance underneath an `:internal` key. For the the pool context, the `:config` key remains public; for the instance, the `:id` and `:scripting-container` remain public.
+1 |
@@ -85,13 +93,14 @@ | |||
old-pool-state :- jruby-schemas/PoolState | |||
new-pool-state :- jruby-schemas/PoolState | |||
refill? :- schema/Bool] | |||
(let [{:keys [config pool-state]} pool-context | |||
(let [{:keys [config]} pool-context | |||
pool-state-atom (get-in pool-context [:internal :pool-state]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to call (jruby-internal/get-pool-state pool-context)
here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get-pool-state
returns the dereferenced atom, but I can use get-pool-state-container
, and yeah doing that sounds like a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool - makes sense.
👍 and can merge after the one cosmetic change with the use of |
@camlow325 updated. |
Looks like Travis failed on one cell, for oraclejdk7 only, for the latest run on this PR. From https://travis-ci.org/puppetlabs/jruby-utils/jobs/137349890:
Doesn't seem like it would be related to the changes in this PR. @rlinehan, you agree? |
Hmmm, I agree, but also it's failed twice in a row now (I already reran it once). |
Well I'm 👍. Are we good with merging (re: travis)? |
@jpinsonault I believe we are. We're going to change some of the |
Cool |
Both the pool context and the instance contain keys that we don't want users
to mess with - such as the pool and flush agents and the
flush-instance-fn
.This commit moves all keys we want to keep "private" in both the pool context
and the instance underneath an
:internal
key.For the the pool context, the
:config
key remains public; for the instance,the
:id
and:scripting-container
remain public.