2

I have a Sinatra app that I have deployed to Heroku. There's a webpage where a user submits a form, it writes some files to a temporary folder, then executes a shell command that has to consume those files that were just written.

The problem is that when I execute a shell, the executed command doesn't have access to the files written to the temporary folder. The shell command is supposed to write another file to the temporary folder, but that file isn't visible to the Ruby code after the shell command has finished running.

I think the web instance is running in one dyno, but the shell command gets executed in another dyno. Is there a way to force the shell command to be executed in the same dyno that the HTTP request/response is running in?


Edit: I did some more debugging and it seems like they are both running in the same dyno (ENV['DYNO'] is the same as [backtick]echo $DYNO[backtick]).

4

0 回答 0