-
Notifications
You must be signed in to change notification settings - Fork 187
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
Stats shows incorrect environment #112
Comments
Hi @srijak - I don't have a test instance of this running, would you mind including a screenshot? If you think this column is confusing or not very useful, we could simply remove it too. Or if you think a different label makes more sense, that works. What do you think would be best? |
I think I'm seeing the same issue:
|
@coffeejunk Would you like to submit a PR based on what @srijak said earlier, using the Rails env instead? Or not displaying anything if the ENV is not set, that might be another solution. |
@andyatkinson sure thing |
Use the `Rails.env` instead of `Sinatra::Application.environment`. Sinatra depends on `APP_ENV` rather than `RAILS_ENV` and defaults to `development` if no `APP_ENV` is set. This can lead to situations where the host application is running in `production` but the dashboard is showing `development`. Fixes ejschmitt#112
Hello,
Thanks for creating this project: it's been easy to setup and use.
I came across the following issue and would love some clarification.
In the Stats page, the environment label is sourced from Sinatra::Application.environment[0], which depends on a APP_ENV enviroment variable[1].
It looks like setting this up doesn't affect anything other than that specific label because the DB connection used to get DelayedJob(s) is whatever rails is setup to use.
Is that correct? If so, would it make more sense to use the rails env value?
[0]https://github.com/ejschmitt/delayed_job_web/blob/master/lib/delayed_job_web/application/views/stats.erb#L8
[1]http://sinatrarb.com/configuration.html
The text was updated successfully, but these errors were encountered: