News for hackers. Stuff that matters.
Re:A Deep Dive into Solid Queue for Ruby on Rails by jaredsohn on Tuesday June 24, 2025 @03:32AM (#44363721)
I made the original post.

At the time there were 5-10 posts (you can look at timestamps if you want to see) and they were all basically assuming that this YC startup misused Rails, etc while I view what they were doing as reasonable, to the extent I can tell.

Basically, if you need to do something that will time out or do something independent of user action, you'll be using enqueued jobs. If you're enqueuing a job because a request is slow and building a db index for it would make it fast, then you're doing things wrong but it isn't clear if that is happening.

Even the multi-region part doesn't seem too complex to me, although I've not had the need for it. I just asked an AI to build me some code for it; you just pass a customer-specific argument into each worker which then enqueues into the proper redis instance or whatever.

I've built jobs that enqueue other jobs and do it for the reasons you mentioned. Sometimes have jobs that do something and then enqueue another job. That happens since that second job might get run in other situations, as well. I don't see that as spaghetti.

Most of the jobs I've built are tracked in some db field to indicate if they were done or not. We'll want those things done and not care too much about when. That seems like a simple concept to me so those code that enqueues it isn't spaghetti in my opinion.

There are no comments on this comment yet.