-
Notifications
You must be signed in to change notification settings - Fork 1
Add Get Feed Property block #43
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
base: time-plus-win-fixes
Are you sure you want to change the base?
Conversation
|
@brentru @tylerdcooper @jwcooper any other feed related properties you want? As I exposed the last_value/previous value option, it felt sensible to include the current value in the list. At that point maybe the original Get Feed block could be replaced/migrated to this Get Feed Property block with the property pointed at Current Value. |
|
This is needed! I do think this should replace the existing feed block completely, when its ready. Re: current/last value, I'm pretty sure there is no difference. We only store 1 value in the DB, can't query any further back. The only place where we have 2 values is in the feed triggers (I had to do an epic code/schema change to get this working in the hot path!) We could expose the "active trigger" to the action itself and have the 2 values available on that block somehow. Other property thoughts:
(Haven't looked at code yet.) |
lorennorman
left a comment
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.
this seems reasonable! wow that's a lot of tests, interesting.
it's missing something, has to be added a regenerator list somewhere that maps between the blockly block type and the io bytecode key... or something like this, just global search for another block type and you'll find it.
i wouldn't approve fully until:
- we talk about it more
- we get the Ruby side built out
- we decide and implement a migration to replace the old feed block
- this will include more code here, not just ruby
| ['Feed Key', 'key'], | ||
| ['Name', 'name'], | ||
| ['Description', 'description'], | ||
| ['Current Value', 'current_value'], | ||
| ['Previous/Last Value', 'last_value'], | ||
| ['Updated At (UTC)', 'updated_at'], | ||
| ['Created At (UTC)', 'created_at'], | ||
| ['Unit Type', 'unit_type'], | ||
| ['Unit Symbol', 'unit_symbol'], | ||
| ['Status', 'status'], | ||
| ['Visibility', 'visibility'], |
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.
can add a third element to each option, will be used in the docs
This adds a Get Feed Property block, to facilitate comparing last updated etc, and easily retrieving feed keys / status.
Then the idea would be to replace this action's Liquid template usage with time + feed_property blocks:
