Skip to content

Instantly share code, notes, and snippets.

@umdstu
Created May 4, 2020 13:40
Show Gist options
  • Save umdstu/e3d2c4d62f0a984f7d6b39547558d8d8 to your computer and use it in GitHub Desktop.
Save umdstu/e3d2c4d62f0a984f7d6b39547558d8d8 to your computer and use it in GitHub Desktop.
do_bypass = False
def bypass_wait():
print('this never gets run')
do_bypass = True
bypass = widgets.Button(description='Skip')
bypass.on_click(bypass_wait)
display(bypass)
async def check_status(objects):
while True:
try:
resp = request.get(url)
if do_bypass:
break
elif resp.status == 1:
raise Exception
else:
break
except Exception as e:
print('still waiting...')
await asyncio.sleep(30)
obj = {}
await check_status(obj)
print('done')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment