Skip to content
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

Create a Rocket.Chat connector module #672

Closed
jacobtomlinson opened this issue Sep 30, 2018 · 1 comment · Fixed by #685
Closed

Create a Rocket.Chat connector module #672

jacobtomlinson opened this issue Sep 30, 2018 · 1 comment · Fixed by #685

Comments

@jacobtomlinson
Copy link
Member

jacobtomlinson commented Sep 30, 2018

Let's add a Rocket.Chat connector as proposed in #498.

Steps

Resources to get you started

Asyncio

Opsdroid uses asyncio and an event loop, so here are some things to bear in mind:

  • Functions should be coroutines which are defined with async def myfunc(): ...
  • Coroutines are called with await. For example await myfunc(). This is how asyncio allows many functions to take it in turns as they swap over when the current thread calls await.
  • Don't block the thread! If you need to make a call to a blocking function such as time.sleep() or any kind of IO request such as requests.get() then you should await an async variant. For example you can call await asyncio.sleep(10) to sleep without blocking the whole application and you can use aiohttp as an async url library.
@FabioRosado
Copy link
Member

I have been wanting to tackle this for a while but kept slipping my mind, so I'll give it a try 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants