Skip to content

Commit

Permalink
Disable mission control jobs on production (#1877)
Browse files Browse the repository at this point in the history
* route condition add

* check env condition
  • Loading branch information
apoorv1316 authored Jul 12, 2024
1 parent 93f0ec6 commit 2142d5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ CI=true

# SolidQueue Configuration
SOLID_QUEUE_USERNAME: <some_username>
SOLID_QUEUE_PASSWORD: <some_password>
SOLID_QUEUE_PASSWORD: <some_password>
MISSION_CONTROL_ENABLED=true
4 changes: 3 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ def draw(routes_name)
end

Rails.application.routes.draw do
mount MissionControl::Jobs::Engine, at: "/jobs"
if ENV["MISSION_CONTROL_ENABLED"] == "true"
mount MissionControl::Jobs::Engine, at: "/jobs"
end

namespace :admin do
resources :users
Expand Down

0 comments on commit 2142d5d

Please sign in to comment.