You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When no arguments are specified, Process.daemon redirects all output to /dev/null; therefore, if the service is run directly via bundle exec ruby services/sqs_processor.rb --logfile=my.log --pidfile=my.pid, no output is logged. After changing the line to Process.daemon(true, true), it executes fine and logs output as expected.
Disclaimer: I have no idea what sets the RUN environment variable, because googling that turned out quite difficult.
The text was updated successfully, but these errors were encountered:
Keep in mind that setting the arguments as (nil, true) will make the script change its working dir to /, and attempt to create log and pid files there. This would fail unless you run it as root or have write permission on /, or specify the full path for log and pid files. Setting the arguments as (true, true) will make the script stay in the same directory.
When no arguments are specified,
Process.daemon
redirects all output to/dev/null
; therefore, if the service is run directly viabundle exec ruby services/sqs_processor.rb --logfile=my.log --pidfile=my.pid
, no output is logged. After changing the line toProcess.daemon(true, true)
, it executes fine and logs output as expected.Disclaimer: I have no idea what sets the
RUN
environment variable, because googling that turned out quite difficult.The text was updated successfully, but these errors were encountered: