-
Notifications
You must be signed in to change notification settings - Fork 87
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
Infinite redirect loop if no servers can be found #56
Comments
Oops, redirecting on |
I went with something else instead: just set the |
+1 |
My bad, I had not enabled Solid Queue in my dev environment. Following the README steps, it works seamlessly when using Solid Queue. |
Problem
When
MissionControl::Jobs::Current.application.servers
is empty, the application gets stuck in an infinite redirect loop. This might happen whenconfig.active_job.queue_adapter
is not set.Why it happens
Visiting
http://localhost:3000/jobs
will redirect tohttp://localhost:3000/jobs/
which redirects to itself and so on.This happens when there are zero
MissionControl::Jobs::Current.application.servers
which raises aMissionControl::Jobs::Errors::ResourceNotFound
which in turn redirects toroot_url
which callsqueues#index
which starts the redirect loop again.Proposed solution
If no servers are found, do not redirect to root_url but show an error message. Optional: If
config.active_job.queue_adapter
is set, suggest the user to set it as that's likely the cause for no servers being found.The text was updated successfully, but these errors were encountered: