class
Mosquito::Api::ConcurrencyConfig
- Mosquito::Api::ConcurrencyConfig
- Reference
- Object
Overview
Provides read/write access to the remotely stored concurrency limits
used by RemoteConfigDequeueAdapter.
Supports both global limits (shared by all overseers) and per-overseer limits for asymmetric hardware configurations.
config = Mosquito::Api::ConcurrencyConfig.instance
config.limits # => global limits
config.limits(overseer_id: "gpu-worker-1") # => per-overseer limits
config.update({"queue_a" => 5}) # write global
config.update({"queue_a" => 1}, overseer_id: "gpu-worker-1") # write per-overseer
config.clear # remove global limits
config.clear(overseer_id: "gpu-worker-1") # remove per-overseer limits
Defined in:
mosquito/api/concurrency_config.crConstructors
Instance Method Summary
-
#clear(overseer_id : String) : Nil
Removes stored concurrency limits for a specific overseer.
-
#clear : Nil
Removes all globally stored concurrency limits.
-
#limits(overseer_id : String) : Hash(String, Int32)
Returns the concurrency limits stored for a specific overseer.
-
#limits : Hash(String, Int32)
Returns the global concurrency limits stored in the backend.
-
#update(new_limits : Hash(String, Int32), overseer_id : String) : Nil
Overwrites the stored concurrency limits for a specific overseer.
-
#update(new_limits : Hash(String, Int32)) : Nil
Overwrites the global stored concurrency limits with new_limits.
Constructor Detail
Instance Method Detail
Returns the concurrency limits stored for a specific overseer.
Overwrites the stored concurrency limits for a specific overseer.
Overwrites the global stored concurrency limits with new_limits.