Class: LaunchDarkly::Impl::Integrations::Consul::ConsulUtil Private
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Integrations::Consul::ConsulUtil
- Defined in:
- lib/ldclient-rb/impl/integrations/consul_impl.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
-
.batch_operations(ops) ⇒ Object
private
Submits as many transactions as necessary to submit all of the given operations.
Class Method Details
.batch_operations(ops) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Submits as many transactions as necessary to submit all of the given operations. The ops array is consumed.
159 160 161 162 163 164 165 166 |
# File 'lib/ldclient-rb/impl/integrations/consul_impl.rb', line 159 def self.batch_operations(ops) batch_size = 64 # Consul can only do this many at a time while true chunk = ops.shift(batch_size) break if chunk.empty? Diplomat::Kv.txn(chunk) end end |