Replies: 1 comment 5 replies
-
@dehjli85 that's strange! Are you running the Either way, the Rails environment will be initialized, so you can make a Rails initializer that does something like: # config/initializers/debug_env.rb
puts "RAILS_ENV: #{ENV['RAILS_ENV']}" |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to use good_jobs to run a set of jobs that send emails. We have different environments set up (i.e. prod, test, dev), and we only want to have the emails sent when running the job in the prod environment. Our email sending services allows us to append a flag (as JSON) on email requests to indicate whether it's a sandbox request vs. a real request, so in our dev/test environments, we use add this flag, and in our production environment we don't.
For some reason, these jobs we've written seem to be running properly (they get recorded in the
good_jobs
table, and appropriate changes are recorded in our database), but the emails aren't actually getting sent (we've verified with our provider they aren't getting sent real requests). I suspect the reason is because thegood_jobs
processes isn't able to access/read the environment variables we have set up properly, since everything in the jobs seems to be working except the actual emails going out.Is there a good/easy way to verify whether the environment variables are being accessed properly?
For reference, our code looks like something like this:
Beta Was this translation helpful? Give feedback.
All reactions