Things we tried

We tried to run an async function without awaiting. This is not possible in Python.

We tried to run a multiple async functions that do not end. The problem is that function 1 does not return and function 2 never seems to start. We tried this with the asyncio.gather function. See code snippet:

await asyncio.gather(
  asyncFunThatNeverEnds1(),
  asyncFunThatNeverEnds2()
)

Alternatively, the gather function should have shorter lived functions. What we should check are timestamps here so that we do not miss words. See snippet below:

wt = WordTracker()

while True:
  # forever try to do the following functions
  await wt.gather(
    wt.run(),  # a short lived 10 second function.
    getWords()  # a shorted lived 5 second function to check the data structure.
  )

Task Completed

  • Created a new auth token using notes from 20220620-twitch-chat-i-am-the-bot-part-I.md
  • Added a doc string using the Google Python style guide.
  • Researched asyncio in Python.

Future work

  • Debug asyncio gather and coroutines in Python.
  • Call the chat bot and word tracker separately without blocking each other.
  • Use GitHub integrations to run Python test with Poetry.
  • Create blog post of cloud storage and load balancer experience for a static website.