Docs for iterable job #6469
Replies: 2 comments 1 reply
-
|
Another: I'd read "Your job class must include the Sidekiq::IterableJob module, not Sidekiq::Job" as "you must not include Sidekiq::Job" It looks like that's actually okay but then we just include |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the feedback, we're still polishing bits. The API is a bit confusing but I wanted to retain compatibility with the existing iteration gems/code out there so I couldn't change too much of the API. Where did you start from that it took you 30 minutes to find the docs? The Iteration page is linked on the wiki home and in the 7.3.0 changelog. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm implementing my first iterable job and struggled a bit, so I thought I'd share some feedback on how the docs could be clearer.
cursor— whether I needed to pass it in as a starting arg, and if so what value to start with, or if Sidekiq handled it internally. I also took a while to figure out that the arguments also get passed to the iteration block, and the order that happened in was unintuitive. Also, it wasn't clear that the args is absolutely required to be included, even if you don't need it in the iteration block.cursor, just because cursor is a kwarg. Clarity that cursor is a special inside param could have saved me time.Combining these all together, perhaps the first example could instead be a simple version of ActiveRecord enumerator with a single argument, including an example of calling that job? This would have really saved me cognitive load.
Beta Was this translation helpful? Give feedback.
All reactions