opal
opal copied to clipboard
Data source refresh
exposes periodic_update_interval on OPAL_DATA_SOURCE_CONFIG to allow for auto PUT data updates from a given source to be generated at a set interval (in seconds)
Deploy Preview for opal-docs canceled.
Name | Link |
---|---|
Latest commit | 974b704f8a5d21ffab132bb9bac27e99b706feae |
Latest deploy log | https://app.netlify.com/sites/opal-docs/deploys/6349aba45a285c00089878b7 |
@orweis I've updated it with your feedback besides the locally defined named function. Mainly since it seemed to not like doing it with list comprehension, and I didn't want to do it outside the list comprehension because I thought it would break function scope on that (because I have a very limited understanding of how python does scoping)
It's not working when you have multiple entries. It "register" multiple entries but then trigger x times the last entry. The issue is in packages/opal-server/opal_server/data/data_update_publisher.py line 139. bind_for_repeat() is using the local variable source of the function create_polling_update() and not it's own. That's why at the end, retry will always trigger only the last entry. I am checking and will push a fix tomorrow (github is blocked at my company)
@asafc @orishavit
Just with that it should fix it i think (Maybe i am wrong, i am new in the coroutines world):
async def bind_for_repeat(bind_source = source): await self._periodic_update_callback(bind_source)