Skip to content
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

Poll and count don't use substitutions #150

Closed
ghost opened this issue Jun 10, 2016 · 0 comments
Closed

Poll and count don't use substitutions #150

ghost opened this issue Jun 10, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 10, 2016

Discussion was started here: #144 (comment)

my initial ask:

p.s. rather than opening another issue immediately, another quick question: Is it possible to source integers from environment variables in the YAML? I ask because I just tried to source poll delay and count from environ, but test failed complaining about strings vs. integers. I tried unquoting the value during shell export, but no dice. Worth opening a new issue?

@cdent's reponse from #144:

...However, poll and count, don't use substitutions so even if the environment was producing stuff it wouldn't get pulled, so some fixes would be needed in the poll handling.
Yeah, if you could make a fresh issue, that would be great.

cdent added a commit that referenced this issue Jul 13, 2016
This uses the new make_numerals functionality on replace_template
to make sure that the output of the replace_template is treated
as a number.

Fixes #150
cdent added a commit that referenced this issue Mar 11, 2017
Since we know that count must always be an int and delay can be
either and int or float, the yaml data is passed through
replace_template and then cast to int or float explicitly.

This is different previous solution which tries to rely on the
casting happening in replace_template. With the new coerce style of
numbers-in-data handling being developed in #206 that strategy won't
work. In any case, this way is more contained and explicit.

Fixes #150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants