lib/telegram/bot/api.rb in telegram-bot-ruby-0.3.3 vs lib/telegram/bot/api.rb in telegram-bot-ruby-0.3.4
- old
+ new
@@ -11,14 +11,15 @@
REPLY_MARKUP_TYPES = [
Telegram::Bot::Types::ReplyKeyboardMarkup,
Telegram::Bot::Types::ReplyKeyboardHide,
Telegram::Bot::Types::ForceReply
].freeze
+ POOL_SIZE = ENV.fetch('TELEGRAM_BOT_POOL_SIZE', 1).to_i.freeze
attr_reader :token
base_uri 'https://api.telegram.org'
- persistent_connection_adapter
+ persistent_connection_adapter pool_size: POOL_SIZE
def initialize(token)
@token = token
end