Module: Hatchet::ConcurrencyProto Private
- Defined in:
- lib/hatchet/concurrency.rb,
sig/hatchet/concurrency.rbs
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Shared serialization helpers for concurrency entries
Constant Summary collapse
- LIMIT_STRATEGY_MAP =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Map Ruby symbol to v1 proto enum symbol
{ cancel_in_progress: :CANCEL_IN_PROGRESS, cancel_newest: :CANCEL_NEWEST, group_round_robin: :GROUP_ROUND_ROBIN, queue: :QUEUE_NEWEST, drop_newest: :DROP_NEWEST, cancel_queued_except_newest: :CANCEL_QUEUED_EXCEPT_NEWEST, cancel_queued_except_oldest: :CANCEL_QUEUED_EXCEPT_OLDEST, }.freeze
Class Method Summary collapse
-
.split_max_runs(max_runs) ⇒ Array(Integer, String, nil)
private
Split the max_runs union onto the proto's static/expression field pair.
Class Method Details
.split_max_runs(max_runs) ⇒ Array(Integer, String, nil)
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.
Split the max_runs union onto the proto's static/expression field pair. A String is a CEL expression over task input; the static field then carries the default of 1, which only governs slots created before the expression existed (each new task's slot carries its own evaluated value).
34 35 36 37 38 |
# File 'lib/hatchet/concurrency.rb', line 34 def self.split_max_runs(max_runs) return [1, max_runs] if max_runs.is_a?(String) [max_runs, nil] end |