All threads / Sidekiq file access
Ask A Question

Notifications

You’re not receiving notifications from this thread.

Sidekiq file access

Cheerio asked in Rails

I have an application on Heroku that has a Postgres database and sidekiq running on a hosted Redis instance.

A tool I want to rely on is able to generate JSON output when an output file is specified but it will also print to stdout the non-JSON output. Before deploying the app to Heroku, I was passing a temporary file as output to the tool, opening the file and processing the JSON contents and finally deleting it, but now on Heroku, sidekiq doesn't have access to files.

Since I just want the JSON data, is there a way to run the tool and just process the JSON output without using an object storage service like S3 and having to deal with tmp files? Alternatively, is there a way to do something like passing a memory mapped file to the output file option of the tool and read it from memory?

Thank you

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 68,099+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2022 GoRails, LLC. All rights reserved.