Skip to content

Instantly share code, notes, and snippets.

@teknogeek0
Last active August 29, 2015 14:17
Show Gist options
  • Save teknogeek0/4a881ec2853b6403a49a to your computer and use it in GitHub Desktop.
Save teknogeek0/4a881ec2853b6403a49a to your computer and use it in GitHub Desktop.
chef template issue?
in template:
relationship_cache_array_fraction=<%= (2000 / node['neo4j']['server']['jvm']['xmx'].to_i).to_f * 100 %>
in role:
"neo4j" : {
"server" : {
"jvm" : {
"xms" : "76800",
"xmx" : "76800",
...
I believe that the math should be (2000/76800) * 100, which = ~2.6(minus some digits)
I end up with in file:
relationship_cache_array_fraction=0.0
Why is that?
@teknogeek0
Copy link
Author

figured it out. need to do node['neo4j']['server']['jvm']['xmx'].to_f) and then im good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment