Struct google_cloudtasks2_beta2::PullTasksRequest [] [src]

pub struct PullTasksRequest {
    pub filter: Option<String>,
    pub max_tasks: Option<i32>,
    pub response_view: Option<String>,
    pub lease_duration: Option<String>,
}

Request message for pulling tasks using CloudTasks.PullTasks.

Activities

This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).

Fields

filter can be used to specify a subset of tasks to lease.

When filter is set to tag=<my-tag> then the PullTasksResponse will contain only tasks whose PullMessage.tag is equal to <my-tag>. <my-tag> can be a bytes encoded as a string and must be less than 500 bytes. If <my-tag> includes whitespace or special characters (characters which aren't letters, numbers, or underscores), then it must be double-quoted. Double quotes and backslashes in quoted strings must be escaped by preceding it with a backslash (\).

When filter is set to tag=oldest_tag(), only tasks which have the same tag as the task with the oldest schedule_time will be returned.

Grammar Syntax:

  • filter = "tag=" comparable

  • comparable = tag | function

  • tag = string | bytes

  • function = "oldest_tag()"

The oldest_tag() function returns tasks which have the same tag as the oldest task (ordered by schedule time).

The maximum number of tasks to lease. The maximum that can be requested is 1000.

The response_view specifies which subset of the Task will be returned.

By default response_view is Task.View.BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains.

Authorization for Task.View.FULL requires cloudtasks.tasks.fullView Google IAM permission on the Task.name resource.

The duration of the lease.

Each task returned in the PullTasksResponse will have its Task.schedule_time set to the current time plus the lease_duration. A task that has been returned in a PullTasksResponse is leased -- that task will not be returned in a different PullTasksResponse before the Task.schedule_time.

After the lease holder has successfully finished the work associated with the task, the lease holder must call CloudTasks.AcknowledgeTask. If the task is not acknowledged via CloudTasks.AcknowledgeTask before the Task.schedule_time then it will be returned in a later PullTasksResponse so that another lease holder can process it.

The maximum lease duration is 1 week. lease_duration will be truncated to the nearest second.

Trait Implementations

impl Default for PullTasksRequest
[src]

[src]

Returns the "default value" for a type. Read more

impl Clone for PullTasksRequest
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for PullTasksRequest
[src]

[src]

Formats the value using the given formatter.

impl RequestValue for PullTasksRequest
[src]