December Adventure Day 27

Published as part of 'December Adventure 2025' series.

The last few days have each featured a very productive half hour. I'm letting the ebook bot sit as-is for now. It's working just fine and while I was working on its reimplementation in Rust, I remembered another Rust rewrite I wanted to get back to.

I'm in a song-listening club with some friends. The little bit of code that runs it is a handful of Python scripts and systemd timers. For as small as it is, I overbaked it a bit. There's a RabbitMQ server. This doesn't need a RabbitMQ server. And I often wish there were one service instead of five.

So that's what I've been rewriting and setting up. Since Christmas Eve I've ported the code that generates the statistics page and the bit that posts a pair of songs on Saturdays for a "flashback" discussion. I had to think harder about async and moves and ownership and errors.

I had to find a job scheduling library that would let me nicely mix tasks that should run on an interval (every 5 minutes) and on a schedule (every Saturday at 9am). I found turnkeeper which serves that nicely. I nearly gave up on it when I was running into a "future cannot be sent between threads safely" error... But it turned out that organizing my code better resolved the issue.

A satisfying resolution, even if fundamentally I'm not exactly sure where a future was trying to go between threads.