Skip to content

Commit

Permalink
Disable DfE::Analytics async jobs on Development
Browse files Browse the repository at this point in the history
The events from DfE::Analytics won't spin a background job on
development environment.
  • Loading branch information
scruti committed Dec 4, 2024
1 parent 573b6e5 commit 96a89b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DFE_ANALYTICS_ASYNC=false
DFE_ANALYTICS_LOG_ONLY=true
DFE_SIGN_IN_REDIRECT_URL=http://localhost:3000/auth/dfe/callback
DISABLE_EMAILS=false
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/dfe_analytics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Whether to use ActiveJob or dispatch events immediately.
#
config.async = true
config.async = ActiveModel::Type::Boolean.new.cast(ENV.fetch("DFE_ANALYTICS_ASYNC", false))

# Which ActiveJob queue to put events on
#
Expand Down

0 comments on commit 96a89b6

Please sign in to comment.