Created
September 20, 2022 16:09
-
-
Save mturoci/9678af54c18565111182d6c2827b9ed8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async def polling_function(q: Q): | |
count = 0 | |
total = 20 | |
while count < total: | |
# You would make an async HTTP call here in real-world to get the fresh data. | |
await q.sleep(1) | |
count +=1 | |
q.page['meta'].dialog.items[0].progress.value = count / total | |
await q.page.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment