Skip to content

Commit 2142d5d

Browse files
authored
Disable mission control jobs on production (#1877)
* route condition add * check env condition
1 parent 93f0ec6 commit 2142d5d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,5 @@ CI=true
5858

5959
# SolidQueue Configuration
6060
SOLID_QUEUE_USERNAME: <some_username>
61-
SOLID_QUEUE_PASSWORD: <some_password>
61+
SOLID_QUEUE_PASSWORD: <some_password>
62+
MISSION_CONTROL_ENABLED=true

config/routes.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ def draw(routes_name)
77
end
88

99
Rails.application.routes.draw do
10-
mount MissionControl::Jobs::Engine, at: "/jobs"
10+
if ENV["MISSION_CONTROL_ENABLED"] == "true"
11+
mount MissionControl::Jobs::Engine, at: "/jobs"
12+
end
1113

1214
namespace :admin do
1315
resources :users

0 commit comments

Comments
 (0)