Merge pull request #1710 from basecamp/flavorjones/plan-b-cleanup

Restore structured logging of `queenbee_id`
This commit is contained in:
Mike Dalessio
2025-11-24 15:59:14 -05:00
committed by GitHub
3 changed files with 7 additions and 18 deletions
+7 -4
View File
@@ -1,4 +1,7 @@
# # TODO:PLANB: we should log account id
# ActiveSupport.on_load(:action_controller_base) do
# before_action { logger.struct tenant: ApplicationRecord.current_tenant }
# end
ActiveSupport.on_load(:action_controller_base) do
before_action do
if Current.account.present?
logger.try(:struct, account: { queenbee_id: Current.account.external_account_id })
end
end
end
-12
View File
@@ -1,12 +0,0 @@
namespace :seed do
desc "Seed customer data for a specific account (e.g: rails seed:customer ARTENANT=1234)"
task :customer, [ :tenant_id ] => "db:tenant" do |t, args|
raise "TODO:PLANB: Need to re-implement this task for untenanted context"
# raise "Please provide a tenant ID: rails seed:customer ARTENANT=1234" unless ApplicationRecord.current_tenant
# account = Account.sole
# Account::Seeder.new(account, User.active.first).seed!
# puts "✓ Seeded account #{account.name} (tenant: #{account.id})"
end
end
-2
View File
@@ -48,8 +48,6 @@ module ActiveSupport
include Turbo::Broadcastable::TestHelper
setup do
# TODO:PLANB: this is hacky, we should sort through the `Current` dependencies and figure out
# how to set Current.user without needing both a session *and* an account
Current.account = accounts("37s")
end