File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 55
66return unless CodeOcean ::Config . new ( :code_ocean ) . read [ :prometheus_exporter ] [ :enabled ] && !defined? ( Rails ::Console )
77return if %w[ db: assets: ] . any? { |task | Rake . application . top_level_tasks . to_s . include? ( task ) }
8+ return if %w[ i18n ] . any? ( File . basename ( $PROGRAM_NAME) )
89
910# Add metric callbacks to all models
1011ActiveSupport . on_load :active_record do
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ module Controller
1010
1111 class << self
1212 def initialize_metrics
13- return unless CodeOcean ::Config . new ( :code_ocean ) . read [ :prometheus_exporter ] [ :enabled ] && defined? ( ::Rails ::Console ) . blank?
13+ return unless CodeOcean ::Config . new ( :code_ocean ) . read [ :prometheus_exporter ] [ :enabled ] && !defined? ( Rails ::Console )
14+ return if %w[ db: assets: ] . any? { |task | Rake . application . top_level_tasks . to_s . include? ( task ) }
15+ return if %w[ i18n ] . any? ( File . basename ( $PROGRAM_NAME) )
1416
1517 register_metrics
1618 Rails . application . executor . wrap do
You can’t perform that action at this time.
0 commit comments