Closed amontalban closed 7 years ago
Yes, if redis_settings.snapshots
were an empty iterable. Either []
or {}
. Should be pretty easy to set a default.
@myoung34 yes I tested with Redis 3.0 (We don't need to do snapshots as we use in-memory cache and don't care about it being persistent).
Let me know if you have any improvement for this, thanks!
@amontalban can you set the default in map.jinja to be : {}
? that should let you remove the duplicated if
conditionals (i'm pushing for DRY here)
If that default is set, I'm pretty sure the added conditional logic in this PR is not required.
@myoung34 I have tried the formula setting in pillar snapshots: {}
and it worked.
So I was thinking what is the best way to define it empty snapshots: {}
or snapshots:
. If it is former then this PR is not needed.
Regarding changing default values I vote against because the current defaults are what Redis recommends.
Thanks and sorry for my late reply!
The former makes most sense at a glance, so thats what I would prefer.
The latter reads like invalid yaml (although it isnt), i prefer to see what the value is, even if its just {}
@myoung34 cool thanks for the quick reply. I'm closing this up sorry for the trouble.
Asking questions is never trouble!
Have you tested this and it's working as expected? @blbradley is there a better way than repeating the
if != ''
?