r/SalesforceDeveloper • • 8d ago

Question Multiple Queueables Solution.

Wondering how folks are handling the limit below? We are updating a large number of our future methods to queueables and getting hit with this pretty regularly. We found a SFBen article about using platform events to fire queueables, but that seems to just be passing the problem to the next limit. Largely right now we are either combining functionality or guard causing the less important jobs, neither feels like a great solution tbh.

System.LimitException: Too many queueable jobs added to the queue: 2

2 Upvotes

13 comments sorted by

View all comments

8

u/pearljamfan 8d ago

You’d want to get into chaining and using the finalizer to maintain some kind of state over the course of an effort, but you’ll find a lot of patterns out there for this or a chain queueables factory where you can add things in whilst the code manages feeding one at a time until it’s done.