Class: Google::Apis::CloudtasksV2beta2::ThrottleConfig
- Inherits:
-
Object
- Object
- Google::Apis::CloudtasksV2beta2::ThrottleConfig
- Defined in:
- generated/google/apis/cloudtasks_v2beta2/classes.rb,
generated/google/apis/cloudtasks_v2beta2/representations.rb,
generated/google/apis/cloudtasks_v2beta2/representations.rb
Overview
Throttle config. These settings determine the throttling behavior.
Instance Attribute Summary collapse
-
#max_burst_size ⇒ Fixnum
Output only.
-
#max_outstanding_tasks ⇒ Fixnum
The maximum number of outstanding tasks that Cloud Tasks allows to be dispatched for this queue.
-
#max_tasks_dispatched_per_second ⇒ Float
The maximum rate at which tasks are dispatched from this queue.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ThrottleConfig
constructor
A new instance of ThrottleConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ ThrottleConfig
Returns a new instance of ThrottleConfig
1696 1697 1698 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1696 def initialize(**args) update!(**args) end |
Instance Attribute Details
#max_burst_size ⇒ Fixnum
Output only. The max burst size limits how fast the queue is processed when many tasks are in the queue and the rate is high. This field allows the queue to have a high rate so processing starts shortly after a task is enqueued, but still limits resource usage when many tasks are enqueued in a short period of time.
- For App Engine queues, if ThrottleConfig.max_tasks_dispatched_per_second is 1, this field is 10; otherwise this field is ThrottleConfig.max_tasks_dispatched_per_second / 5.
- For pull queues, this field is output only and always 10,000.
Note: For App Engine queues that were created through
queue.yaml/xml
,max_burst_size
might not have the same settings as specified above; CloudTasks.UpdateQueue can be used to setmax_burst_size
only to the values specified above. This field has the same meaning as bucket_size in queue.yaml. Corresponds to the JSON propertymaxBurstSize
1668 1669 1670 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1668 def max_burst_size @max_burst_size end |
#max_outstanding_tasks ⇒ Fixnum
The maximum number of outstanding tasks that Cloud Tasks allows to be dispatched for this queue. After this threshold has been reached, Cloud Tasks stops dispatching tasks until the number of outstanding requests decreases. The maximum allowed value is 5,000.
- For App Engine queues, this field is 10 by default.
- For pull queues, this field is output only and always -1, which
indicates no limit.
This field has the same meaning as
max_concurrent_requests in queue.yaml.
Corresponds to the JSON property
maxOutstandingTasks
1683 1684 1685 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1683 def max_outstanding_tasks @max_outstanding_tasks end |
#max_tasks_dispatched_per_second ⇒ Float
The maximum rate at which tasks are dispatched from this queue. The maximum allowed value is 500.
- For App Engine queues, this field is 1 by default.
- For pull queues, this field is output only and always 10,000.
This field has the same meaning as
rate in queue.yaml.
Corresponds to the JSON property
maxTasksDispatchedPerSecond
1694 1695 1696 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1694 def max_tasks_dispatched_per_second @max_tasks_dispatched_per_second end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1701 1702 1703 1704 1705 |
# File 'generated/google/apis/cloudtasks_v2beta2/classes.rb', line 1701 def update!(**args) @max_burst_size = args[:max_burst_size] if args.key?(:max_burst_size) @max_outstanding_tasks = args[:max_outstanding_tasks] if args.key?(:max_outstanding_tasks) @max_tasks_dispatched_per_second = args[:max_tasks_dispatched_per_second] if args.key?(:max_tasks_dispatched_per_second) end |