From 11f6e6969e366ced498dd8c21e12e15dd387b1d9 Mon Sep 17 00:00:00 2001 From: Justin Vallelonga Date: Mon, 14 Oct 2024 13:39:19 +0700 Subject: [PATCH 1/7] some experimental code for fixing the logging for the workers --- app/jobs/send_reset_password_email_job.rb | 5 +++ config/application.rb | 8 +++++ config/environments/development.rb | 40 +++++++++++++++++++++-- config/initializers/solid_queue.rb | 38 +++++++++++++++++++++ 4 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 config/initializers/solid_queue.rb diff --git a/app/jobs/send_reset_password_email_job.rb b/app/jobs/send_reset_password_email_job.rb index 53bdd9fa8..22715f183 100644 --- a/app/jobs/send_reset_password_email_job.rb +++ b/app/jobs/send_reset_password_email_job.rb @@ -4,6 +4,11 @@ class SendResetPasswordEmailJob < ApplicationJob def perform(email, os, browser) person = Person.find_by_email(email) + Rails.logger.level = 0 + + Rails.logger.info "Sending reset password email to #{email} from #{os} with #{browser}" + Rails.logger.error "-----------test error log" + if person&.user # make sure the user exists (i.e. user has not become a tombstone) PasswordMailer.with(person: person, os: os, browser: browser).reset.deliver_now end diff --git a/config/application.rb b/config/application.rb index ec493f21c..68e7d5111 100644 --- a/config/application.rb +++ b/config/application.rb @@ -47,5 +47,13 @@ class Application < Rails::Application config.to_prepare do # FIXME: Remove this hack after Rails PR merges in: https://github.com/rails/rails/pull/52421 ActionCable::Channel::Base.include ActionCableBasePatch end + + + # config.web_console.permissions = '172.18.0.0' + config.web_console.whitelisted_ips = "172.18.0.0/16" + + + + config.log_level = :debug end end diff --git a/config/environments/development.rb b/config/environments/development.rb index b29b14136..5d491689d 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,6 +1,10 @@ require "active_support/core_ext/integer/time" +# require "solid_queue" + Rails.application.configure do + + puts "Loading development environment" # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time @@ -60,7 +64,8 @@ config.active_job.verbose_enqueue_logs = true # Suppress logger output for asset requests. - config.assets.quiet = true + # config.assets.quiet = true + config.assets.quiet = false # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true @@ -75,9 +80,38 @@ config.action_controller.raise_on_missing_callback_actions = true # Since most people will not set the variable, polling will not be logged - config.solid_queue.silence_polling = ENV["SOLID_QUEUE_LOG_POLLING_ON"] != "false" + # anything but explicitly false + log_polling = ENV["SOLID_QUEUE_LOG_POLLING_ON"] != "false" + config.solid_queue.silence_polling = log_polling # NOTE: this is backwards, true means silence + # config.solid_queue.process_heartbeat_interval = 3.seconds - config.web_console.permissions = ["192.168.0.0/16", "172.17.0.0/16"] + config.web_console.permissions = ["192.168.0.0/16", "172.17.0.0/16", "172.18.0.0/16"] config.hosts << ENV["DEV_HOST"] if ENV["DEV_HOST"].present? + + + config.log_level = :debug + + # config.log_tags = [:subdomain, :uuid] + # config.logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) + # config.logger = Logger.new(STDOUT) + # stdout_logger = ActiveSupport::Logger.new(STDOUT) + + stdout_logger = ActiveSupport::Logger.new(STDOUT) + # custom_logger = CustomLogger.new(STDOUT) + tagged_logger = ActiveSupport::TaggedLogging.new(stdout_logger) + + # class CustomLogger < ActiveSupport::TaggedLogging + # def add(severity, message = nil, progname = nil) + # super unless message.include?("UPDATE \"solid_queue_processes\" SET \"last_heartbeat_at\"") + # end + # end + + + config.log_tags = [ :request_id ] + config.logger = tagged_logger + + # config.logger = ActiveSupport::Logger.new(STDOUT) + + end diff --git a/config/initializers/solid_queue.rb b/config/initializers/solid_queue.rb new file mode 100644 index 000000000..bfe3f3ea2 --- /dev/null +++ b/config/initializers/solid_queue.rb @@ -0,0 +1,38 @@ +# require "solid_queue" + +# class SolidQueue::Process < SolidQueue::Record +# def heartbeat +# puts "heartbeat" +# Rails.logger.info "in heartbeat for process #{id}" + +# # stuff_to_do = lambda { +# # puts "stuff_to_do" +# # ActiveRecord::Base.logger.info "Updating heartbeat for process #{id}" +# # # Clear any previous changes before locking, for example, in case a previous heartbeat +# # # failed because of a DB issue (with SQLite depending on configuration, a BusyException +# # # is not rare) and we still have the unpersisted value +# # restore_attributes +# # with_lock { touch(:last_heartbeat_at) } +# # } + +# # only silence if explicitly set to not log +# silence_heartbeat = ENV["SOLID_QUEUE_LOG_HEARTBEAT_ON"] == "false" + +# # ActiveRecord::Base.logger.silence stuff_to_do + +# if silence_heartbeat && ActiveRecord::Base.logger +# Rails.logger.info "Silencing heartbeat for process #{id}" +# puts "foo" +# ActiveRecord::Base.logger.silence { touch(:last_heartbeat_at) } +# else +# Rails.logger.info "Updating heartbeat for process #{id}" +# touch(:last_heartbeat_at) +# puts "bar" +# end +# rescue e +# Rails.logger.error "Error updating heartbeat for process #{id}" +# puts "e" +# puts e +# raise e +# end +# end From fe2026b01244fc2008a5b101f45d10185ee3cd38 Mon Sep 17 00:00:00 2001 From: Justin Vallelonga Date: Tue, 15 Oct 2024 10:53:33 +0700 Subject: [PATCH 2/7] trying more ways to monkeypatch solidqueue --- app/models/solid_queue/process.rb | 47 ++++++++++++++++++ config/application.rb | 2 + config/initializers/solid_queue.rb | 38 --------------- config/initializers/solid_queue_extension.rb | 51 ++++++++++++++++++++ lib/solid_queue/process.rb | 49 +++++++++++++++++++ 5 files changed, 149 insertions(+), 38 deletions(-) create mode 100644 app/models/solid_queue/process.rb delete mode 100644 config/initializers/solid_queue.rb create mode 100644 config/initializers/solid_queue_extension.rb create mode 100644 lib/solid_queue/process.rb diff --git a/app/models/solid_queue/process.rb b/app/models/solid_queue/process.rb new file mode 100644 index 000000000..dee1307b2 --- /dev/null +++ b/app/models/solid_queue/process.rb @@ -0,0 +1,47 @@ +# module CustomSolidQueueProcess +# def heartbeat +# super + +# # puts "heartbeat" +# # Rails.logger.info "in heartbeat for process #{id}" + +# # # stuff_to_do = lambda { +# # # puts "stuff_to_do" +# # # ActiveRecord::Base.logger.info "Updating heartbeat for process #{id}" +# # # # Clear any previous changes before locking, for example, in case a previous heartbeat +# # # # failed because of a DB issue (with SQLite depending on configuration, a BusyException +# # # # is not rare) and we still have the unpersisted value +# # # restore_attributes +# # # with_lock { touch(:last_heartbeat_at) } +# # # } + +# # # only silence if explicitly set to not log +# # silence_heartbeat = ENV["SOLID_QUEUE_LOG_HEARTBEAT_ON"] == "false" + +# # # ActiveRecord::Base.logger.silence stuff_to_do + +# # if silence_heartbeat && ActiveRecord::Base.logger +# # Rails.logger.info "Silencing heartbeat for process #{id}" +# # puts "foo" +# # # ActiveRecord::Base.logger.silence { touch(:last_heartbeat_at) } +# # ActiveRecord::Base.logger.silence super +# # else +# # Rails.logger.info "Updating heartbeat for process #{id}" +# # # touch(:last_heartbeat_at) +# # super +# # puts "bar" +# # end +# # rescue e +# # Rails.logger.error "Error updating heartbeat for process #{id}" +# # puts "e" +# # puts e +# # raise e +# end +# end + +# class SolidQueue::Process < SolidQueue::Record +# def heartbeat +# puts "foo" +# end +# # prepend CustomSolidQueueProcess +# end diff --git a/config/application.rb b/config/application.rb index 68e7d5111..4337f7537 100644 --- a/config/application.rb +++ b/config/application.rb @@ -9,6 +9,8 @@ require_relative "../lib/nil_class" require_relative "../app/models/feature" require_relative "../app/models/setting" +require "solid_queue" +require_relative "../lib/solid_queue/process" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. diff --git a/config/initializers/solid_queue.rb b/config/initializers/solid_queue.rb deleted file mode 100644 index bfe3f3ea2..000000000 --- a/config/initializers/solid_queue.rb +++ /dev/null @@ -1,38 +0,0 @@ -# require "solid_queue" - -# class SolidQueue::Process < SolidQueue::Record -# def heartbeat -# puts "heartbeat" -# Rails.logger.info "in heartbeat for process #{id}" - -# # stuff_to_do = lambda { -# # puts "stuff_to_do" -# # ActiveRecord::Base.logger.info "Updating heartbeat for process #{id}" -# # # Clear any previous changes before locking, for example, in case a previous heartbeat -# # # failed because of a DB issue (with SQLite depending on configuration, a BusyException -# # # is not rare) and we still have the unpersisted value -# # restore_attributes -# # with_lock { touch(:last_heartbeat_at) } -# # } - -# # only silence if explicitly set to not log -# silence_heartbeat = ENV["SOLID_QUEUE_LOG_HEARTBEAT_ON"] == "false" - -# # ActiveRecord::Base.logger.silence stuff_to_do - -# if silence_heartbeat && ActiveRecord::Base.logger -# Rails.logger.info "Silencing heartbeat for process #{id}" -# puts "foo" -# ActiveRecord::Base.logger.silence { touch(:last_heartbeat_at) } -# else -# Rails.logger.info "Updating heartbeat for process #{id}" -# touch(:last_heartbeat_at) -# puts "bar" -# end -# rescue e -# Rails.logger.error "Error updating heartbeat for process #{id}" -# puts "e" -# puts e -# raise e -# end -# end diff --git a/config/initializers/solid_queue_extension.rb b/config/initializers/solid_queue_extension.rb new file mode 100644 index 000000000..177a69ad1 --- /dev/null +++ b/config/initializers/solid_queue_extension.rb @@ -0,0 +1,51 @@ + +# Rails.application.configure do + +# module SolidQueue + +# class CustomSolidQueueProcess +# def heartbeat +# puts "heartbeat" +# Rails.logger.info "in heartbeat for process #{id}" + +# # stuff_to_do = lambda { +# # puts "stuff_to_do" +# # ActiveRecord::Base.logger.info "Updating heartbeat for process #{id}" +# # # Clear any previous changes before locking, for example, in case a previous heartbeat +# # # failed because of a DB issue (with SQLite depending on configuration, a BusyException +# # # is not rare) and we still have the unpersisted value +# # restore_attributes +# # with_lock { touch(:last_heartbeat_at) } +# # } + +# # only silence if explicitly set to not log +# silence_heartbeat = ENV["SOLID_QUEUE_LOG_HEARTBEAT_ON"] == "false" + +# # ActiveRecord::Base.logger.silence stuff_to_do + +# if silence_heartbeat && ActiveRecord::Base.logger +# Rails.logger.info "Silencing heartbeat for process #{id}" +# puts "foo" +# # ActiveRecord::Base.logger.silence { touch(:last_heartbeat_at) } +# ActiveRecord::Base.logger.silence super +# else +# Rails.logger.info "Updating heartbeat for process #{id}" +# # touch(:last_heartbeat_at) +# super +# puts "bar" +# end +# rescue e +# Rails.logger.error "Error updating heartbeat for process #{id}" +# puts "e" +# puts e +# raise e +# end +# end + +# class Process < Record +# prepend CustomSolidQueueProcess +# end + +# end + +# end diff --git a/lib/solid_queue/process.rb b/lib/solid_queue/process.rb new file mode 100644 index 000000000..1ca98e526 --- /dev/null +++ b/lib/solid_queue/process.rb @@ -0,0 +1,49 @@ +require "solid_queue" + +module CustomSolidQueueProcess + def heartbeat + super + + # puts "heartbeat" + # Rails.logger.info "in heartbeat for process #{id}" + + # # stuff_to_do = lambda { + # # puts "stuff_to_do" + # # ActiveRecord::Base.logger.info "Updating heartbeat for process #{id}" + # # # Clear any previous changes before locking, for example, in case a previous heartbeat + # # # failed because of a DB issue (with SQLite depending on configuration, a BusyException + # # # is not rare) and we still have the unpersisted value + # # restore_attributes + # # with_lock { touch(:last_heartbeat_at) } + # # } + + # # only silence if explicitly set to not log + # silence_heartbeat = ENV["SOLID_QUEUE_LOG_HEARTBEAT_ON"] == "false" + + # # ActiveRecord::Base.logger.silence stuff_to_do + + # if silence_heartbeat && ActiveRecord::Base.logger + # Rails.logger.info "Silencing heartbeat for process #{id}" + # puts "foo" + # # ActiveRecord::Base.logger.silence { touch(:last_heartbeat_at) } + # ActiveRecord::Base.logger.silence super + # else + # Rails.logger.info "Updating heartbeat for process #{id}" + # # touch(:last_heartbeat_at) + # super + # puts "bar" + # end + # rescue e + # Rails.logger.error "Error updating heartbeat for process #{id}" + # puts "e" + # puts e + # raise e + end +end + +class SolidQueue::Process < SolidQueue::Record + def heartbeat + puts "foo" + end + # prepend CustomSolidQueueProcess +end From 9a3cf450cdcad9768a1699a1052efa91ef0283eb Mon Sep 17 00:00:00 2001 From: Justin Vallelonga Date: Tue, 15 Oct 2024 14:39:00 +0700 Subject: [PATCH 3/7] monkeypatches solidqueue to not log heartbeats --- app/models/solid_queue/process.rb | 47 -------------- config/application.rb | 2 - config/environments/development.rb | 17 ----- config/initializers/solid_queue_extension.rb | 68 +++++--------------- lib/solid_queue/process.rb | 49 -------------- 5 files changed, 17 insertions(+), 166 deletions(-) delete mode 100644 app/models/solid_queue/process.rb delete mode 100644 lib/solid_queue/process.rb diff --git a/app/models/solid_queue/process.rb b/app/models/solid_queue/process.rb deleted file mode 100644 index dee1307b2..000000000 --- a/app/models/solid_queue/process.rb +++ /dev/null @@ -1,47 +0,0 @@ -# module CustomSolidQueueProcess -# def heartbeat -# super - -# # puts "heartbeat" -# # Rails.logger.info "in heartbeat for process #{id}" - -# # # stuff_to_do = lambda { -# # # puts "stuff_to_do" -# # # ActiveRecord::Base.logger.info "Updating heartbeat for process #{id}" -# # # # Clear any previous changes before locking, for example, in case a previous heartbeat -# # # # failed because of a DB issue (with SQLite depending on configuration, a BusyException -# # # # is not rare) and we still have the unpersisted value -# # # restore_attributes -# # # with_lock { touch(:last_heartbeat_at) } -# # # } - -# # # only silence if explicitly set to not log -# # silence_heartbeat = ENV["SOLID_QUEUE_LOG_HEARTBEAT_ON"] == "false" - -# # # ActiveRecord::Base.logger.silence stuff_to_do - -# # if silence_heartbeat && ActiveRecord::Base.logger -# # Rails.logger.info "Silencing heartbeat for process #{id}" -# # puts "foo" -# # # ActiveRecord::Base.logger.silence { touch(:last_heartbeat_at) } -# # ActiveRecord::Base.logger.silence super -# # else -# # Rails.logger.info "Updating heartbeat for process #{id}" -# # # touch(:last_heartbeat_at) -# # super -# # puts "bar" -# # end -# # rescue e -# # Rails.logger.error "Error updating heartbeat for process #{id}" -# # puts "e" -# # puts e -# # raise e -# end -# end - -# class SolidQueue::Process < SolidQueue::Record -# def heartbeat -# puts "foo" -# end -# # prepend CustomSolidQueueProcess -# end diff --git a/config/application.rb b/config/application.rb index 4337f7537..68e7d5111 100644 --- a/config/application.rb +++ b/config/application.rb @@ -9,8 +9,6 @@ require_relative "../lib/nil_class" require_relative "../app/models/feature" require_relative "../app/models/setting" -require "solid_queue" -require_relative "../lib/solid_queue/process" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. diff --git a/config/environments/development.rb b/config/environments/development.rb index 5d491689d..02fffaae5 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -89,29 +89,12 @@ config.hosts << ENV["DEV_HOST"] if ENV["DEV_HOST"].present? - config.log_level = :debug - - # config.log_tags = [:subdomain, :uuid] - # config.logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT)) - # config.logger = Logger.new(STDOUT) - # stdout_logger = ActiveSupport::Logger.new(STDOUT) - stdout_logger = ActiveSupport::Logger.new(STDOUT) - # custom_logger = CustomLogger.new(STDOUT) tagged_logger = ActiveSupport::TaggedLogging.new(stdout_logger) - # class CustomLogger < ActiveSupport::TaggedLogging - # def add(severity, message = nil, progname = nil) - # super unless message.include?("UPDATE \"solid_queue_processes\" SET \"last_heartbeat_at\"") - # end - # end - - config.log_tags = [ :request_id ] config.logger = tagged_logger - # config.logger = ActiveSupport::Logger.new(STDOUT) - end diff --git a/config/initializers/solid_queue_extension.rb b/config/initializers/solid_queue_extension.rb index 177a69ad1..7ff95c58c 100644 --- a/config/initializers/solid_queue_extension.rb +++ b/config/initializers/solid_queue_extension.rb @@ -1,51 +1,17 @@ - -# Rails.application.configure do - -# module SolidQueue - -# class CustomSolidQueueProcess -# def heartbeat -# puts "heartbeat" -# Rails.logger.info "in heartbeat for process #{id}" - -# # stuff_to_do = lambda { -# # puts "stuff_to_do" -# # ActiveRecord::Base.logger.info "Updating heartbeat for process #{id}" -# # # Clear any previous changes before locking, for example, in case a previous heartbeat -# # # failed because of a DB issue (with SQLite depending on configuration, a BusyException -# # # is not rare) and we still have the unpersisted value -# # restore_attributes -# # with_lock { touch(:last_heartbeat_at) } -# # } - -# # only silence if explicitly set to not log -# silence_heartbeat = ENV["SOLID_QUEUE_LOG_HEARTBEAT_ON"] == "false" - -# # ActiveRecord::Base.logger.silence stuff_to_do - -# if silence_heartbeat && ActiveRecord::Base.logger -# Rails.logger.info "Silencing heartbeat for process #{id}" -# puts "foo" -# # ActiveRecord::Base.logger.silence { touch(:last_heartbeat_at) } -# ActiveRecord::Base.logger.silence super -# else -# Rails.logger.info "Updating heartbeat for process #{id}" -# # touch(:last_heartbeat_at) -# super -# puts "bar" -# end -# rescue e -# Rails.logger.error "Error updating heartbeat for process #{id}" -# puts "e" -# puts e -# raise e -# end -# end - -# class Process < Record -# prepend CustomSolidQueueProcess -# end - -# end - -# end +module CustomProcess + def heartbeat + # only silence if explicitly set to not log (default to logging) + # true or not set (or anything else) means log, false means silence + silence_heartbeat = ENV["SOLID_QUEUE_LOG_HEARTBEAT_ON"] == "false" + + if silence_heartbeat && ActiveRecord::Base.logger + ActiveRecord::Base.logger.silence { super } + else + super + end + end +end + +Rails.application.config.after_initialize do + SolidQueue::Process.send(:prepend, CustomProcess) +end diff --git a/lib/solid_queue/process.rb b/lib/solid_queue/process.rb deleted file mode 100644 index 1ca98e526..000000000 --- a/lib/solid_queue/process.rb +++ /dev/null @@ -1,49 +0,0 @@ -require "solid_queue" - -module CustomSolidQueueProcess - def heartbeat - super - - # puts "heartbeat" - # Rails.logger.info "in heartbeat for process #{id}" - - # # stuff_to_do = lambda { - # # puts "stuff_to_do" - # # ActiveRecord::Base.logger.info "Updating heartbeat for process #{id}" - # # # Clear any previous changes before locking, for example, in case a previous heartbeat - # # # failed because of a DB issue (with SQLite depending on configuration, a BusyException - # # # is not rare) and we still have the unpersisted value - # # restore_attributes - # # with_lock { touch(:last_heartbeat_at) } - # # } - - # # only silence if explicitly set to not log - # silence_heartbeat = ENV["SOLID_QUEUE_LOG_HEARTBEAT_ON"] == "false" - - # # ActiveRecord::Base.logger.silence stuff_to_do - - # if silence_heartbeat && ActiveRecord::Base.logger - # Rails.logger.info "Silencing heartbeat for process #{id}" - # puts "foo" - # # ActiveRecord::Base.logger.silence { touch(:last_heartbeat_at) } - # ActiveRecord::Base.logger.silence super - # else - # Rails.logger.info "Updating heartbeat for process #{id}" - # # touch(:last_heartbeat_at) - # super - # puts "bar" - # end - # rescue e - # Rails.logger.error "Error updating heartbeat for process #{id}" - # puts "e" - # puts e - # raise e - end -end - -class SolidQueue::Process < SolidQueue::Record - def heartbeat - puts "foo" - end - # prepend CustomSolidQueueProcess -end From a7b3897d08b82ac18fc2adffe533c8e7987b6e16 Mon Sep 17 00:00:00 2001 From: Justin Vallelonga Date: Tue, 15 Oct 2024 14:47:28 +0700 Subject: [PATCH 4/7] removes debugging code --- app/jobs/send_reset_password_email_job.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/jobs/send_reset_password_email_job.rb b/app/jobs/send_reset_password_email_job.rb index 22715f183..371de716b 100644 --- a/app/jobs/send_reset_password_email_job.rb +++ b/app/jobs/send_reset_password_email_job.rb @@ -4,10 +4,7 @@ class SendResetPasswordEmailJob < ApplicationJob def perform(email, os, browser) person = Person.find_by_email(email) - Rails.logger.level = 0 - Rails.logger.info "Sending reset password email to #{email} from #{os} with #{browser}" - Rails.logger.error "-----------test error log" if person&.user # make sure the user exists (i.e. user has not become a tombstone) PasswordMailer.with(person: person, os: os, browser: browser).reset.deliver_now From de87f6bd8e14a7fece34ce5c8fa8cf0ac73be86c Mon Sep 17 00:00:00 2001 From: Justin Vallelonga Date: Tue, 15 Oct 2024 14:53:10 +0700 Subject: [PATCH 5/7] removes debugging code --- config/application.rb | 8 -------- config/environments/development.rb | 9 ++------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/config/application.rb b/config/application.rb index 68e7d5111..ec493f21c 100644 --- a/config/application.rb +++ b/config/application.rb @@ -47,13 +47,5 @@ class Application < Rails::Application config.to_prepare do # FIXME: Remove this hack after Rails PR merges in: https://github.com/rails/rails/pull/52421 ActionCable::Channel::Base.include ActionCableBasePatch end - - - # config.web_console.permissions = '172.18.0.0' - config.web_console.whitelisted_ips = "172.18.0.0/16" - - - - config.log_level = :debug end end diff --git a/config/environments/development.rb b/config/environments/development.rb index 02fffaae5..206b45a2e 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,10 +1,6 @@ require "active_support/core_ext/integer/time" -# require "solid_queue" - Rails.application.configure do - - puts "Loading development environment" # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time @@ -64,8 +60,7 @@ config.active_job.verbose_enqueue_logs = true # Suppress logger output for asset requests. - # config.assets.quiet = true - config.assets.quiet = false + config.assets.quiet = true # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true @@ -85,7 +80,7 @@ config.solid_queue.silence_polling = log_polling # NOTE: this is backwards, true means silence # config.solid_queue.process_heartbeat_interval = 3.seconds - config.web_console.permissions = ["192.168.0.0/16", "172.17.0.0/16", "172.18.0.0/16"] + config.web_console.permissions = ["192.168.0.0/16", "172.17.0.0/16"] config.hosts << ENV["DEV_HOST"] if ENV["DEV_HOST"].present? From 650f49cd654e9a08ddcc254466e6fb4ded6006c1 Mon Sep 17 00:00:00 2001 From: Justin Vallelonga Date: Tue, 15 Oct 2024 14:55:23 +0700 Subject: [PATCH 6/7] removes empty lines --- config/environments/development.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 206b45a2e..acfd4f1bd 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -90,6 +90,4 @@ config.log_tags = [ :request_id ] config.logger = tagged_logger - - end From 555085a616c565a96c1c6ab5489b3c977a524d63 Mon Sep 17 00:00:00 2001 From: Justin Vallelonga Date: Fri, 18 Oct 2024 12:18:25 +0700 Subject: [PATCH 7/7] removes debug code --- config/environments/development.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index acfd4f1bd..ae3bc1af2 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -78,13 +78,11 @@ # anything but explicitly false log_polling = ENV["SOLID_QUEUE_LOG_POLLING_ON"] != "false" config.solid_queue.silence_polling = log_polling # NOTE: this is backwards, true means silence - # config.solid_queue.process_heartbeat_interval = 3.seconds config.web_console.permissions = ["192.168.0.0/16", "172.17.0.0/16"] config.hosts << ENV["DEV_HOST"] if ENV["DEV_HOST"].present? - config.log_level = :debug stdout_logger = ActiveSupport::Logger.new(STDOUT) tagged_logger = ActiveSupport::TaggedLogging.new(stdout_logger)