-
Notifications
You must be signed in to change notification settings - Fork 8
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
Can I use sidekiq-iteration in the job that read remote file? #4
Comments
Sure, but you need to figure out how to write a custom cursor for this (https://github.com/fatkodima/sidekiq-iteration/blob/master/guides/custom-enumerator.md), which is a hard part. One of the (dumb?) solutions is to download the file locally, parse it, push some ids into the redis list, write a custom redis enumerator to iterate over this list and use this enumerator in the job. There was a similar discussion (Shopify/job-iteration#50) in the parent gem before. |
Sorry for the late reply. Got it. But Sidekiq jobs run on Heroku and there's no way to guarantee that downloaded files (for example tmp/files) would exist. |
I fixed this by building a custom iterator. Thank you! |
@remy727 Can you please share the approach you finally decided to use or the iterator's code? So this would be helpful for future seekers or maybe be incorporated into the gem in the future. |
I have the above job and the remote file contains 100K customers.
Can I use
sidekiq-iteration
in this job?The text was updated successfully, but these errors were encountered: