-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
💡 Use trio in this project #3
Comments
I was curious how hard this would be. From a quick skim:
Given a trio http client we like, it would be trivial to replace the use of aiohttp. APScheduler doesn't have trio support, but for the way we're using it here we could replace it with a few lines of code. Feedparser is more of an issue – maybe there's some way we could fetch the RSS ourselves then just ask feedparser to parse it? It's not clear to me whether any of this would be useful though :-). The not never does anything concurrently, so there's actually no reason to use async/await at all... |
I think this could be more for fun than for a serious reason :) The bot code as I see it could be fully synchronous at this time, so maybe it doesn't matter at all. Also if people look up "trio gitter bot" they would find this project! One way concurrent code could maybe be useful is if you want to save something on hosting and run multiple i/o-centric bots like this one in a single Heroku container? That's a stretch just to include some more compelling reason to care about this. Or maybe you want a web interface to monitor the bot. |
Oh, that might be a bit annoying yeah. Don't want to anti-SEO ourselves... Umm. In other news, I might have accidentally made a trio-compatible library for writing github apps?
Super experimental and all that but if someone's looking for an excuse to use trio to manage trio then this might be a more interesting place to start. |
I thought the github bot would be able to get away with heroku's free tier, but I just noticed that webhook deliveries were timing out on a fairly regular basis, so I had to bump it up to the paid tier. So now I'm paying $7/mo twice, once for the gitter bot and once for the github bot. This is still ... objectively not a big deal, at market rate that's equivalent to like a few minutes of programmer time per month, and it would take like a year+ to match what I spent on trio stickers for pycon. But still, it does mean this isn't just theoretical, combining the two bots would directly save money. There might also be neat things we can do by having access to the gitter and github APIs in the same app? And the github bot already has postgres set up, which would make it pretty easy to make the gitter bot more reliable (#4). |
It would be great to use Trio to build the bot for Trio.
The text was updated successfully, but these errors were encountered: