1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-08-28 15:26:18 +03:00

Merge pull request #225 from mario-amazing/master

Fix rails 7.1 broadcast error
Этот коммит содержится в:
Max Melentiev
2023-12-18 20:58:13 +00:00
коммит произвёл GitHub
родитель cd2d3d8d87 f54b36d9b7
Коммит d048f42c6c

Просмотреть файл

@@ -7,7 +7,11 @@ namespace :telegram do
Rake::Task['environment'].invoke
if ENV.fetch('LOG_TO_STDOUT') { Rails.env.development? }.present?
console = ActiveSupport::Logger.new(STDERR)
Rails.logger.extend ActiveSupport::Logger.broadcast console
if ::Rails.logger.respond_to?(:broadcast_to)
::Rails.logger.broadcast_to(console)
else
Rails.logger.extend ActiveSupport::Logger.broadcast console
end
end
Telegram::Bot::UpdatesPoller.start(ENV['BOT'].try!(:to_sym) || :default)
end