What are the defaults for a task queue in AppEngin

2019-02-19 23:57发布

Suppose I create a new queue in my queue.yaml file as:

queue:
- name: my_queue

What would be the equivalent queue with all parameters specified?

Here's what I could gather from the docs so far.

queue:
- name: my_queue
  mode: push
  bucket_size: 5
  target: <the same version that enqueued the task>
  rate: ???
  max_concurrent_requests: ???
  retry_parameters:
    task_retry_limit: ???
    task_age_limit: ???
    min_backoff_seconds: ???
    max_backoff_seconds: ???
    max_doublings: ???

Can you help me fill in the gaps?

1条回答
叛逆
2楼-- · 2019-02-20 00:38

My best stab at this is

queue:
- name: my_queue
  mode: push
  bucket_size: 5
  target: <the same version that enqueued the task>
  rate: 5
  max_concurrent_requests: ∞
  retry_parameters:
    task_retry_limit: ∞
    task_age_limit: ∞
    min_backoff_seconds: 0.1
    max_backoff_seconds: 3600.0
    max_doublings: 16

The rate is documented here.

The rest of the numbers I got from taskqueue_service_pb.py, which you will find in the python SDK, where there is a class called TaskQueueRetryParameters, which looks like this:

class TaskQueueRetryParameters(ProtocolBuffer.ProtocolMessage):
  has_retry_limit_ = 0
  retry_limit_ = 0
  has_age_limit_sec_ = 0
  age_limit_sec_ = 0
  has_min_backoff_sec_ = 0
  min_backoff_sec_ = 0.1
  has_max_backoff_sec_ = 0
  max_backoff_sec_ = 3600.0
  has_max_doublings_ = 0
  max_doublings_ = 16

task_retry_limit and task_age_limit are set to 0 - in other words, there is no limit. Same for max_concurrent_requests, which is defined in another class called TaskQueueUpdateQueueRequest.

查看更多
登录 后发表回答