Method: Exekutor::Configuration#max_execution_threads=
- Defined in:
- lib/exekutor/configuration.rb
#max_execution_threads=(value) ⇒ self
Sets the maximum number of execution threads that may be active. Be aware that if you set this to a value greater than connection_db_config.pool
, workers may have to wait for database connections to become available because all connections are occupied by other threads. This may result in an ActiveRecord::ConnectionTimeoutError
if the thread has to wait too long.
237 238 239 |
# File 'lib/exekutor/configuration.rb', line 237 define_option :max_execution_threads, default: -> { (Internal::BaseRecord.connection_db_config.pool.to_i - 1).clamp(1, 999) }, type: Integer, range: 1...999 |