google-cloud-tasks 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/tasks/v2beta2/cloud_tasks_client.rb +210 -181
- data/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb +79 -63
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/cloudtasks.rb +178 -146
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/queue.rb +103 -68
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/target.rb +110 -71
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb +43 -25
- data/lib/google/cloud/tasks/v2beta2/doc/google/rpc/status.rb +17 -14
- data/lib/google/cloud/tasks/v2beta3/cloud_tasks_client.rb +123 -104
- data/lib/google/cloud/tasks/v2beta3/cloudtasks_services_pb.rb +51 -39
- data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/cloudtasks.rb +116 -92
- data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/queue.rb +84 -55
- data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/target.rb +175 -52
- data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/task.rb +40 -16
- data/lib/google/cloud/tasks/v2beta3/doc/google/rpc/status.rb +17 -14
- data/lib/google/cloud/tasks/v2beta3/target_pb.rb +7 -0
- data/lib/google/cloud/tasks/v2beta3/task_pb.rb +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19caa61f704229d96a9b7a0af59d8ec01e3a20cc2d6dacdeb0fce4e633752a80
|
4
|
+
data.tar.gz: 65c1143058fbad91ad391d3df4ab8b244150d546093b477a71dc24d6f1b6d1a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcfa3261c61ef0dd49a994c9a06cd9030f3fab69c0a52c42455cb8a50a509b54ca0ec87b8d7c5cd0ae4c5c0066c2fb58edd58272d4d607c3b520bff4e7dfd956
|
7
|
+
data.tar.gz: 06f71f2817abf33da4d224320a5e6bf54757b37029ccaa82a693b7dd826af16b160d0a89340699393be3e2596c92ae6608d0166cb1aacae0eac23aff477b14fd
|
@@ -421,11 +421,11 @@ module Google
|
|
421
421
|
# The location name.
|
422
422
|
# For example: `projects/PROJECT_ID/locations/LOCATION_ID`
|
423
423
|
# @param filter [String]
|
424
|
-
# `filter` can be used to specify a subset of queues. Any
|
425
|
-
# field can be used as a filter and
|
426
|
-
# For example: `<=, <, >=, >, !=, =, :`. The
|
427
|
-
# described in
|
428
|
-
#
|
424
|
+
# `filter` can be used to specify a subset of queues. Any
|
425
|
+
# {Google::Cloud::Tasks::V2beta2::Queue Queue} field can be used as a filter and
|
426
|
+
# several operators as supported. For example: `<=, <, >=, >, !=, =, :`. The
|
427
|
+
# filter syntax is the same as described in [Stackdriver's Advanced Logs
|
428
|
+
# Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
|
429
429
|
#
|
430
430
|
# Sample filter "app_engine_http_target: *".
|
431
431
|
#
|
@@ -519,14 +519,15 @@ module Google
|
|
519
519
|
# Creates a queue.
|
520
520
|
#
|
521
521
|
# Queues created with this method allow tasks to live for a maximum of 31
|
522
|
-
# days. After a task is 31 days old, the task will be deleted regardless of
|
523
|
-
# it was dispatched or not.
|
522
|
+
# days. After a task is 31 days old, the task will be deleted regardless of
|
523
|
+
# whether it was dispatched or not.
|
524
524
|
#
|
525
525
|
# WARNING: Using this method may have unintended side effects if you are
|
526
526
|
# using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
|
527
527
|
# Read
|
528
|
-
# [Overview of Queue Management and
|
529
|
-
# before using
|
528
|
+
# [Overview of Queue Management and
|
529
|
+
# queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
|
530
|
+
# this method.
|
530
531
|
#
|
531
532
|
# @param parent [String]
|
532
533
|
# Required.
|
@@ -542,7 +543,8 @@ module Google
|
|
542
543
|
#
|
543
544
|
# The queue to create.
|
544
545
|
#
|
545
|
-
# {Google::Cloud::Tasks::V2beta2::Queue#name Queue's name} cannot be the same as
|
546
|
+
# {Google::Cloud::Tasks::V2beta2::Queue#name Queue's name} cannot be the same as
|
547
|
+
# an existing queue.
|
546
548
|
# A hash of the same form as `Google::Cloud::Tasks::V2beta2::Queue`
|
547
549
|
# can also be provided.
|
548
550
|
# @param options [Google::Gax::CallOptions]
|
@@ -582,25 +584,28 @@ module Google
|
|
582
584
|
# the queue if it does exist.
|
583
585
|
#
|
584
586
|
# Queues created with this method allow tasks to live for a maximum of 31
|
585
|
-
# days. After a task is 31 days old, the task will be deleted regardless of
|
586
|
-
# it was dispatched or not.
|
587
|
+
# days. After a task is 31 days old, the task will be deleted regardless of
|
588
|
+
# whether it was dispatched or not.
|
587
589
|
#
|
588
590
|
# WARNING: Using this method may have unintended side effects if you are
|
589
591
|
# using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
|
590
592
|
# Read
|
591
|
-
# [Overview of Queue Management and
|
592
|
-
# before using
|
593
|
+
# [Overview of Queue Management and
|
594
|
+
# queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
|
595
|
+
# this method.
|
593
596
|
#
|
594
597
|
# @param queue [Google::Cloud::Tasks::V2beta2::Queue | Hash]
|
595
598
|
# Required.
|
596
599
|
#
|
597
600
|
# The queue to create or update.
|
598
601
|
#
|
599
|
-
# The queue's {Google::Cloud::Tasks::V2beta2::Queue#name name} must be
|
602
|
+
# The queue's {Google::Cloud::Tasks::V2beta2::Queue#name name} must be
|
603
|
+
# specified.
|
600
604
|
#
|
601
605
|
# Output only fields cannot be modified using UpdateQueue.
|
602
606
|
# Any value specified for an output only field will be ignored.
|
603
|
-
# The queue's {Google::Cloud::Tasks::V2beta2::Queue#name name} cannot be
|
607
|
+
# The queue's {Google::Cloud::Tasks::V2beta2::Queue#name name} cannot be
|
608
|
+
# changed.
|
604
609
|
# A hash of the same form as `Google::Cloud::Tasks::V2beta2::Queue`
|
605
610
|
# can also be provided.
|
606
611
|
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
@@ -649,8 +654,9 @@ module Google
|
|
649
654
|
# WARNING: Using this method may have unintended side effects if you are
|
650
655
|
# using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
|
651
656
|
# Read
|
652
|
-
# [Overview of Queue Management and
|
653
|
-
# before using
|
657
|
+
# [Overview of Queue Management and
|
658
|
+
# queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
|
659
|
+
# this method.
|
654
660
|
#
|
655
661
|
# @param name [String]
|
656
662
|
# Required.
|
@@ -725,9 +731,10 @@ module Google
|
|
725
731
|
#
|
726
732
|
# If a queue is paused then the system will stop dispatching tasks
|
727
733
|
# until the queue is resumed via
|
728
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::ResumeQueue ResumeQueue}. Tasks can
|
729
|
-
# when the queue is paused. A queue is paused if its
|
730
|
-
# {Google::Cloud::Tasks::V2beta2::Queue#state state} is
|
734
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::ResumeQueue ResumeQueue}. Tasks can
|
735
|
+
# still be added when the queue is paused. A queue is paused if its
|
736
|
+
# {Google::Cloud::Tasks::V2beta2::Queue#state state} is
|
737
|
+
# {Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED}.
|
731
738
|
#
|
732
739
|
# @param name [String]
|
733
740
|
# Required.
|
@@ -764,14 +771,17 @@ module Google
|
|
764
771
|
#
|
765
772
|
# This method resumes a queue after it has been
|
766
773
|
# {Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED} or
|
767
|
-
# {Google::Cloud::Tasks::V2beta2::Queue::State::DISABLED DISABLED}. The state of a
|
768
|
-
# in the queue's
|
769
|
-
#
|
774
|
+
# {Google::Cloud::Tasks::V2beta2::Queue::State::DISABLED DISABLED}. The state of a
|
775
|
+
# queue is stored in the queue's
|
776
|
+
# {Google::Cloud::Tasks::V2beta2::Queue#state state}; after calling this method
|
777
|
+
# it will be set to
|
778
|
+
# {Google::Cloud::Tasks::V2beta2::Queue::State::RUNNING RUNNING}.
|
770
779
|
#
|
771
780
|
# WARNING: Resuming many high-QPS queues at the same time can
|
772
781
|
# lead to target overloading. If you are resuming high-QPS
|
773
782
|
# queues, follow the 500/50/5 pattern described in
|
774
|
-
# [Managing Cloud Tasks Scaling
|
783
|
+
# [Managing Cloud Tasks Scaling
|
784
|
+
# Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
|
775
785
|
#
|
776
786
|
# @param name [String]
|
777
787
|
# Required.
|
@@ -804,9 +814,9 @@ module Google
|
|
804
814
|
@resume_queue.call(req, options, &block)
|
805
815
|
end
|
806
816
|
|
807
|
-
# Gets the access control policy for a
|
808
|
-
# Returns an empty policy if the
|
809
|
-
# set.
|
817
|
+
# Gets the access control policy for a
|
818
|
+
# {Google::Cloud::Tasks::V2beta2::Queue Queue}. Returns an empty policy if the
|
819
|
+
# resource exists and does not have a policy set.
|
810
820
|
#
|
811
821
|
# Authorization requires the following
|
812
822
|
# [Google IAM](https://cloud.google.com/iam) permission on the specified
|
@@ -844,8 +854,8 @@ module Google
|
|
844
854
|
@get_iam_policy.call(req, options, &block)
|
845
855
|
end
|
846
856
|
|
847
|
-
# Sets the access control policy for a
|
848
|
-
# policy.
|
857
|
+
# Sets the access control policy for a
|
858
|
+
# {Google::Cloud::Tasks::V2beta2::Queue Queue}. Replaces any existing policy.
|
849
859
|
#
|
850
860
|
# Note: The Cloud Console does not check queue-level IAM permissions yet.
|
851
861
|
# Project-level permissions are required to use the Cloud Console.
|
@@ -898,9 +908,10 @@ module Google
|
|
898
908
|
@set_iam_policy.call(req, options, &block)
|
899
909
|
end
|
900
910
|
|
901
|
-
# Returns permissions that a caller has on a
|
902
|
-
# If the resource does not exist,
|
903
|
-
# permissions, not a
|
911
|
+
# Returns permissions that a caller has on a
|
912
|
+
# {Google::Cloud::Tasks::V2beta2::Queue Queue}. If the resource does not exist,
|
913
|
+
# this will return an empty set of permissions, not a
|
914
|
+
# {Google::Rpc::Code::NOT_FOUND NOT_FOUND} error.
|
904
915
|
#
|
905
916
|
# Note: This operation is designed to be used for building permission-aware
|
906
917
|
# UIs and command-line tools, not for authorization checking. This operation
|
@@ -948,10 +959,10 @@ module Google
|
|
948
959
|
|
949
960
|
# Lists the tasks in a queue.
|
950
961
|
#
|
951
|
-
# By default, only the {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}
|
952
|
-
# due to performance considerations;
|
953
|
-
# {Google::Cloud::Tasks::V2beta2::ListTasksRequest#response_view response_view}
|
954
|
-
# subset of information which is returned.
|
962
|
+
# By default, only the {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}
|
963
|
+
# view is retrieved due to performance considerations;
|
964
|
+
# {Google::Cloud::Tasks::V2beta2::ListTasksRequest#response_view response_view}
|
965
|
+
# controls the subset of information which is returned.
|
955
966
|
#
|
956
967
|
# The tasks may be returned in any order. The ordering may change at any
|
957
968
|
# time.
|
@@ -962,18 +973,19 @@ module Google
|
|
962
973
|
# The queue name. For example:
|
963
974
|
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
|
964
975
|
# @param response_view [Google::Cloud::Tasks::V2beta2::Task::View]
|
965
|
-
# The response_view specifies which subset of the
|
966
|
-
# returned.
|
967
|
-
#
|
968
|
-
# By default response_view is
|
969
|
-
#
|
970
|
-
#
|
971
|
-
#
|
972
|
-
# contains.
|
973
|
-
#
|
974
|
-
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
975
|
-
# `cloudtasks.tasks.fullView` [Google
|
976
|
-
# permission on the
|
976
|
+
# The response_view specifies which subset of the
|
977
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} will be returned.
|
978
|
+
#
|
979
|
+
# By default response_view is
|
980
|
+
# {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is
|
981
|
+
# retrieved by default because some data, such as payloads, might be
|
982
|
+
# desirable to return only when needed because of its large size or because
|
983
|
+
# of the sensitivity of data that it contains.
|
984
|
+
#
|
985
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
986
|
+
# requires `cloudtasks.tasks.fullView` [Google
|
987
|
+
# IAM](https://cloud.google.com/iam/) permission on the
|
988
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
977
989
|
# @param page_size [Integer]
|
978
990
|
# The maximum number of resources contained in the underlying API
|
979
991
|
# response. If page streaming is performed per-resource, this
|
@@ -1034,18 +1046,19 @@ module Google
|
|
1034
1046
|
# The task name. For example:
|
1035
1047
|
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
|
1036
1048
|
# @param response_view [Google::Cloud::Tasks::V2beta2::Task::View]
|
1037
|
-
# The response_view specifies which subset of the
|
1038
|
-
# returned.
|
1039
|
-
#
|
1040
|
-
# By default response_view is
|
1041
|
-
#
|
1042
|
-
#
|
1043
|
-
#
|
1044
|
-
# contains.
|
1045
|
-
#
|
1046
|
-
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
1047
|
-
# `cloudtasks.tasks.fullView` [Google
|
1048
|
-
# permission on the
|
1049
|
+
# The response_view specifies which subset of the
|
1050
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} will be returned.
|
1051
|
+
#
|
1052
|
+
# By default response_view is
|
1053
|
+
# {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is
|
1054
|
+
# retrieved by default because some data, such as payloads, might be
|
1055
|
+
# desirable to return only when needed because of its large size or because
|
1056
|
+
# of the sensitivity of data that it contains.
|
1057
|
+
#
|
1058
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
1059
|
+
# requires `cloudtasks.tasks.fullView` [Google
|
1060
|
+
# IAM](https://cloud.google.com/iam/) permission on the
|
1061
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
1049
1062
|
# @param options [Google::Gax::CallOptions]
|
1050
1063
|
# Overrides the default settings for this call, e.g, timeout,
|
1051
1064
|
# retries, etc.
|
@@ -1078,9 +1091,11 @@ module Google
|
|
1078
1091
|
#
|
1079
1092
|
# Tasks cannot be updated after creation; there is no UpdateTask command.
|
1080
1093
|
#
|
1081
|
-
# * For {Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget App Engine queues},
|
1094
|
+
# * For {Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget App Engine queues},
|
1095
|
+
# the maximum task size is
|
1082
1096
|
# 100KB.
|
1083
|
-
# * For {Google::Cloud::Tasks::V2beta2::PullTarget pull queues}, the maximum
|
1097
|
+
# * For {Google::Cloud::Tasks::V2beta2::PullTarget pull queues}, the maximum
|
1098
|
+
# task size is 1MB.
|
1084
1099
|
#
|
1085
1100
|
# @param parent [String]
|
1086
1101
|
# Required.
|
@@ -1096,13 +1111,13 @@ module Google
|
|
1096
1111
|
#
|
1097
1112
|
# Task names have the following format:
|
1098
1113
|
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
|
1099
|
-
# The user can optionally specify a task
|
1100
|
-
# name
|
1101
|
-
# unique task id, which will be set in
|
1102
|
-
# {Google::Cloud::Tasks::V2beta2::Task#name response}.
|
1114
|
+
# The user can optionally specify a task
|
1115
|
+
# {Google::Cloud::Tasks::V2beta2::Task#name name}. If a name is not specified
|
1116
|
+
# then the system will generate a random unique task id, which will be set in
|
1117
|
+
# the task returned in the {Google::Cloud::Tasks::V2beta2::Task#name response}.
|
1103
1118
|
#
|
1104
|
-
# If {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} is not
|
1105
|
-
# past then Cloud Tasks will set it to the current time.
|
1119
|
+
# If {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} is not
|
1120
|
+
# set or is in the past then Cloud Tasks will set it to the current time.
|
1106
1121
|
#
|
1107
1122
|
# Task De-duplication:
|
1108
1123
|
#
|
@@ -1117,10 +1132,10 @@ module Google
|
|
1117
1132
|
# for ~9days after the original task was deleted or completed.
|
1118
1133
|
#
|
1119
1134
|
# Because there is an extra lookup cost to identify duplicate task
|
1120
|
-
# names, these {Google::Cloud::Tasks::V2beta2::CloudTasks::CreateTask CreateTask}
|
1121
|
-
# increased latency. Using hashed strings for the
|
1122
|
-
# the prefix of the task id is recommended. Choosing task ids
|
1123
|
-
# are sequential or have sequential prefixes, for example using a
|
1135
|
+
# names, these {Google::Cloud::Tasks::V2beta2::CloudTasks::CreateTask CreateTask}
|
1136
|
+
# calls have significantly increased latency. Using hashed strings for the
|
1137
|
+
# task id or for the prefix of the task id is recommended. Choosing task ids
|
1138
|
+
# that are sequential or have sequential prefixes, for example using a
|
1124
1139
|
# timestamp, causes an increase in latency and error rates in all
|
1125
1140
|
# task commands. The infrastructure relies on an approximately
|
1126
1141
|
# uniform distribution of task ids to store and serve tasks
|
@@ -1128,18 +1143,19 @@ module Google
|
|
1128
1143
|
# A hash of the same form as `Google::Cloud::Tasks::V2beta2::Task`
|
1129
1144
|
# can also be provided.
|
1130
1145
|
# @param response_view [Google::Cloud::Tasks::V2beta2::Task::View]
|
1131
|
-
# The response_view specifies which subset of the
|
1132
|
-
# returned.
|
1133
|
-
#
|
1134
|
-
# By default response_view is
|
1135
|
-
#
|
1136
|
-
#
|
1137
|
-
#
|
1138
|
-
# contains.
|
1139
|
-
#
|
1140
|
-
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
1141
|
-
# `cloudtasks.tasks.fullView` [Google
|
1142
|
-
# permission on the
|
1146
|
+
# The response_view specifies which subset of the
|
1147
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} will be returned.
|
1148
|
+
#
|
1149
|
+
# By default response_view is
|
1150
|
+
# {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is
|
1151
|
+
# retrieved by default because some data, such as payloads, might be
|
1152
|
+
# desirable to return only when needed because of its large size or because
|
1153
|
+
# of the sensitivity of data that it contains.
|
1154
|
+
#
|
1155
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
1156
|
+
# requires `cloudtasks.tasks.fullView` [Google
|
1157
|
+
# IAM](https://cloud.google.com/iam/) permission on the
|
1158
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
1143
1159
|
# @param options [Google::Gax::CallOptions]
|
1144
1160
|
# Overrides the default settings for this call, e.g, timeout,
|
1145
1161
|
# retries, etc.
|
@@ -1215,18 +1231,19 @@ module Google
|
|
1215
1231
|
#
|
1216
1232
|
# This method is invoked by the worker to obtain a lease. The
|
1217
1233
|
# worker must acknowledge the task via
|
1218
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::AcknowledgeTask AcknowledgeTask}
|
1219
|
-
# performed the work associated with the task.
|
1220
|
-
#
|
1221
|
-
# The {Google::Cloud::Tasks::V2beta2::PullMessage#payload payload} is intended
|
1222
|
-
# the worker needs to perform the work associated with the
|
1223
|
-
# return the payloads in the
|
1224
|
-
# {Google::Cloud::Tasks::V2beta2::
|
1225
|
-
# {Google::Cloud::Tasks::V2beta2::
|
1226
|
-
#
|
1227
|
-
#
|
1228
|
-
#
|
1229
|
-
#
|
1234
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::AcknowledgeTask AcknowledgeTask}
|
1235
|
+
# after they have performed the work associated with the task.
|
1236
|
+
#
|
1237
|
+
# The {Google::Cloud::Tasks::V2beta2::PullMessage#payload payload} is intended
|
1238
|
+
# to store data that the worker needs to perform the work associated with the
|
1239
|
+
# task. To return the payloads in the
|
1240
|
+
# {Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response}, set
|
1241
|
+
# {Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#response_view response_view}
|
1242
|
+
# to {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}.
|
1243
|
+
#
|
1244
|
+
# A maximum of 10 qps of
|
1245
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} requests are
|
1246
|
+
# allowed per queue. {Google::Rpc::Code::RESOURCE_EXHAUSTED RESOURCE_EXHAUSTED}
|
1230
1247
|
# is returned when this limit is
|
1231
1248
|
# exceeded. {Google::Rpc::Code::RESOURCE_EXHAUSTED RESOURCE_EXHAUSTED}
|
1232
1249
|
# is also returned when
|
@@ -1241,10 +1258,11 @@ module Google
|
|
1241
1258
|
# @param lease_duration [Google::Protobuf::Duration | Hash]
|
1242
1259
|
# After the worker has successfully finished the work associated
|
1243
1260
|
# with the task, the worker must call via
|
1244
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::AcknowledgeTask AcknowledgeTask}
|
1245
|
-
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}.
|
1246
|
-
# returned to a later
|
1247
|
-
#
|
1261
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::AcknowledgeTask AcknowledgeTask}
|
1262
|
+
# before the {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}.
|
1263
|
+
# Otherwise the task will be returned to a later
|
1264
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} call so that
|
1265
|
+
# another worker can retry it.
|
1248
1266
|
#
|
1249
1267
|
# The maximum lease duration is 1 week.
|
1250
1268
|
# `lease_duration` will be truncated to the nearest second.
|
@@ -1258,29 +1276,31 @@ module Google
|
|
1258
1276
|
#
|
1259
1277
|
# The largest that `max_tasks` can be is 1000.
|
1260
1278
|
# @param response_view [Google::Cloud::Tasks::V2beta2::Task::View]
|
1261
|
-
# The response_view specifies which subset of the
|
1262
|
-
# returned.
|
1263
|
-
#
|
1264
|
-
# By default response_view is
|
1265
|
-
#
|
1266
|
-
#
|
1267
|
-
#
|
1268
|
-
# contains.
|
1269
|
-
#
|
1270
|
-
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
1271
|
-
# `cloudtasks.tasks.fullView` [Google
|
1272
|
-
# permission on the
|
1279
|
+
# The response_view specifies which subset of the
|
1280
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} will be returned.
|
1281
|
+
#
|
1282
|
+
# By default response_view is
|
1283
|
+
# {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is
|
1284
|
+
# retrieved by default because some data, such as payloads, might be
|
1285
|
+
# desirable to return only when needed because of its large size or because
|
1286
|
+
# of the sensitivity of data that it contains.
|
1287
|
+
#
|
1288
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
1289
|
+
# requires `cloudtasks.tasks.fullView` [Google
|
1290
|
+
# IAM](https://cloud.google.com/iam/) permission on the
|
1291
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
1273
1292
|
# @param filter [String]
|
1274
1293
|
# `filter` can be used to specify a subset of tasks to lease.
|
1275
1294
|
#
|
1276
1295
|
# When `filter` is set to `tag=<my-tag>` then the
|
1277
|
-
# {Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will contain only
|
1278
|
-
# {Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} is equal to
|
1279
|
-
# less than 500 characters.
|
1296
|
+
# {Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will contain only
|
1297
|
+
# tasks whose {Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} is equal to
|
1298
|
+
# `<my-tag>`. `<my-tag>` must be less than 500 characters.
|
1280
1299
|
#
|
1281
1300
|
# When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
|
1282
1301
|
# the same tag as the task with the oldest
|
1283
|
-
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be
|
1302
|
+
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be
|
1303
|
+
# returned.
|
1284
1304
|
#
|
1285
1305
|
# Grammar Syntax:
|
1286
1306
|
#
|
@@ -1298,8 +1318,9 @@ module Google
|
|
1298
1318
|
# [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
|
1299
1319
|
# only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
|
1300
1320
|
# aren't UTF-8 encoded can't be used in the
|
1301
|
-
# {Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter} and the
|
1302
|
-
# {Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} will be displayed
|
1321
|
+
# {Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter} and the
|
1322
|
+
# task's {Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} will be displayed
|
1323
|
+
# as empty in Cloud Tasks.
|
1303
1324
|
# @param options [Google::Gax::CallOptions]
|
1304
1325
|
# Overrides the default settings for this call, e.g, timeout,
|
1305
1326
|
# retries, etc.
|
@@ -1340,12 +1361,13 @@ module Google
|
|
1340
1361
|
# Acknowledges a pull task.
|
1341
1362
|
#
|
1342
1363
|
# The worker, that is, the entity that
|
1343
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks leased} this task must
|
1344
|
-
# to indicate that the work associated with the task has
|
1364
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks leased} this task must
|
1365
|
+
# call this method to indicate that the work associated with the task has
|
1366
|
+
# finished.
|
1345
1367
|
#
|
1346
1368
|
# The worker must acknowledge a task within the
|
1347
|
-
# {Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration}
|
1348
|
-
# will expire and the task will become available to be leased
|
1369
|
+
# {Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#lease_duration lease_duration}
|
1370
|
+
# or the lease will expire and the task will become available to be leased
|
1349
1371
|
# again. After the task is acknowledged, it will not be returned
|
1350
1372
|
# by a later {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks},
|
1351
1373
|
# {Google::Cloud::Tasks::V2beta2::CloudTasks::GetTask GetTask}, or
|
@@ -1362,8 +1384,8 @@ module Google
|
|
1362
1384
|
# The task's current schedule time, available in the
|
1363
1385
|
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by
|
1364
1386
|
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} response or
|
1365
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease} response.
|
1366
|
-
# to ensure that your worker currently holds the lease.
|
1387
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease} response.
|
1388
|
+
# This restriction is to ensure that your worker currently holds the lease.
|
1367
1389
|
# A hash of the same form as `Google::Protobuf::Timestamp`
|
1368
1390
|
# can also be provided.
|
1369
1391
|
# @param options [Google::Gax::CallOptions]
|
@@ -1401,7 +1423,8 @@ module Google
|
|
1401
1423
|
#
|
1402
1424
|
# The worker can use this method to extend the lease by a new
|
1403
1425
|
# duration, starting from now. The new task lease will be
|
1404
|
-
# returned in the task's
|
1426
|
+
# returned in the task's
|
1427
|
+
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}.
|
1405
1428
|
#
|
1406
1429
|
# @param name [String]
|
1407
1430
|
# Required.
|
@@ -1414,8 +1437,8 @@ module Google
|
|
1414
1437
|
# The task's current schedule time, available in the
|
1415
1438
|
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by
|
1416
1439
|
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} response or
|
1417
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease} response.
|
1418
|
-
# to ensure that your worker currently holds the lease.
|
1440
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease} response.
|
1441
|
+
# This restriction is to ensure that your worker currently holds the lease.
|
1419
1442
|
# A hash of the same form as `Google::Protobuf::Timestamp`
|
1420
1443
|
# can also be provided.
|
1421
1444
|
# @param lease_duration [Google::Protobuf::Duration | Hash]
|
@@ -1429,18 +1452,19 @@ module Google
|
|
1429
1452
|
# A hash of the same form as `Google::Protobuf::Duration`
|
1430
1453
|
# can also be provided.
|
1431
1454
|
# @param response_view [Google::Cloud::Tasks::V2beta2::Task::View]
|
1432
|
-
# The response_view specifies which subset of the
|
1433
|
-
# returned.
|
1434
|
-
#
|
1435
|
-
# By default response_view is
|
1436
|
-
#
|
1437
|
-
#
|
1438
|
-
#
|
1439
|
-
# contains.
|
1440
|
-
#
|
1441
|
-
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
1442
|
-
# `cloudtasks.tasks.fullView` [Google
|
1443
|
-
# permission on the
|
1455
|
+
# The response_view specifies which subset of the
|
1456
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} will be returned.
|
1457
|
+
#
|
1458
|
+
# By default response_view is
|
1459
|
+
# {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is
|
1460
|
+
# retrieved by default because some data, such as payloads, might be
|
1461
|
+
# desirable to return only when needed because of its large size or because
|
1462
|
+
# of the sensitivity of data that it contains.
|
1463
|
+
#
|
1464
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
1465
|
+
# requires `cloudtasks.tasks.fullView` [Google
|
1466
|
+
# IAM](https://cloud.google.com/iam/) permission on the
|
1467
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
1444
1468
|
# @param options [Google::Gax::CallOptions]
|
1445
1469
|
# Overrides the default settings for this call, e.g, timeout,
|
1446
1470
|
# retries, etc.
|
@@ -1482,9 +1506,9 @@ module Google
|
|
1482
1506
|
# Cancel a pull task's lease.
|
1483
1507
|
#
|
1484
1508
|
# The worker can use this method to cancel a task's lease by
|
1485
|
-
# setting its {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}
|
1486
|
-
# make the task available to be leased to the next caller
|
1487
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks}.
|
1509
|
+
# setting its {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}
|
1510
|
+
# to now. This will make the task available to be leased to the next caller
|
1511
|
+
# of {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks}.
|
1488
1512
|
#
|
1489
1513
|
# @param name [String]
|
1490
1514
|
# Required.
|
@@ -1497,23 +1521,24 @@ module Google
|
|
1497
1521
|
# The task's current schedule time, available in the
|
1498
1522
|
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by
|
1499
1523
|
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} response or
|
1500
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease} response.
|
1501
|
-
# to ensure that your worker currently holds the lease.
|
1524
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease} response.
|
1525
|
+
# This restriction is to ensure that your worker currently holds the lease.
|
1502
1526
|
# A hash of the same form as `Google::Protobuf::Timestamp`
|
1503
1527
|
# can also be provided.
|
1504
1528
|
# @param response_view [Google::Cloud::Tasks::V2beta2::Task::View]
|
1505
|
-
# The response_view specifies which subset of the
|
1506
|
-
# returned.
|
1507
|
-
#
|
1508
|
-
# By default response_view is
|
1509
|
-
#
|
1510
|
-
#
|
1511
|
-
#
|
1512
|
-
# contains.
|
1513
|
-
#
|
1514
|
-
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
1515
|
-
# `cloudtasks.tasks.fullView` [Google
|
1516
|
-
# permission on the
|
1529
|
+
# The response_view specifies which subset of the
|
1530
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} will be returned.
|
1531
|
+
#
|
1532
|
+
# By default response_view is
|
1533
|
+
# {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is
|
1534
|
+
# retrieved by default because some data, such as payloads, might be
|
1535
|
+
# desirable to return only when needed because of its large size or because
|
1536
|
+
# of the sensitivity of data that it contains.
|
1537
|
+
#
|
1538
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
1539
|
+
# requires `cloudtasks.tasks.fullView` [Google
|
1540
|
+
# IAM](https://cloud.google.com/iam/) permission on the
|
1541
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
1517
1542
|
# @param options [Google::Gax::CallOptions]
|
1518
1543
|
# Overrides the default settings for this call, e.g, timeout,
|
1519
1544
|
# retries, etc.
|
@@ -1550,30 +1575,33 @@ module Google
|
|
1550
1575
|
# Forces a task to run now.
|
1551
1576
|
#
|
1552
1577
|
# When this method is called, Cloud Tasks will dispatch the task, even if
|
1553
|
-
# the task is already running, the queue has reached its
|
1554
|
-
#
|
1578
|
+
# the task is already running, the queue has reached its
|
1579
|
+
# {Google::Cloud::Tasks::V2beta2::RateLimits RateLimits} or is
|
1580
|
+
# {Google::Cloud::Tasks::V2beta2::Queue::State::PAUSED PAUSED}.
|
1555
1581
|
#
|
1556
1582
|
# This command is meant to be used for manual debugging. For
|
1557
|
-
# example, {Google::Cloud::Tasks::V2beta2::CloudTasks::RunTask RunTask} can be
|
1558
|
-
# task after a fix has been made or to manually force
|
1559
|
-
# dispatched now.
|
1583
|
+
# example, {Google::Cloud::Tasks::V2beta2::CloudTasks::RunTask RunTask} can be
|
1584
|
+
# used to retry a failed task after a fix has been made or to manually force
|
1585
|
+
# a task to be dispatched now.
|
1560
1586
|
#
|
1561
1587
|
# The dispatched task is returned. That is, the task that is returned
|
1562
|
-
# contains the {Google::Cloud::Tasks::V2beta2::Task#status status} after the
|
1563
|
-
# before the task is received by its target.
|
1588
|
+
# contains the {Google::Cloud::Tasks::V2beta2::Task#status status} after the
|
1589
|
+
# task is dispatched but before the task is received by its target.
|
1564
1590
|
#
|
1565
1591
|
# If Cloud Tasks receives a successful response from the task's
|
1566
1592
|
# target, then the task will be deleted; otherwise the task's
|
1567
|
-
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be
|
1568
|
-
#
|
1569
|
-
#
|
1593
|
+
# {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be
|
1594
|
+
# reset to the time that
|
1595
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RunTask RunTask} was called plus
|
1596
|
+
# the retry delay specified in the queue's
|
1597
|
+
# {Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig}.
|
1570
1598
|
#
|
1571
1599
|
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RunTask RunTask} returns
|
1572
1600
|
# {Google::Rpc::Code::NOT_FOUND NOT_FOUND} when it is called on a
|
1573
1601
|
# task that has already succeeded or permanently failed.
|
1574
1602
|
#
|
1575
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RunTask RunTask} cannot be called
|
1576
|
-
# {Google::Cloud::Tasks::V2beta2::PullMessage pull task}.
|
1603
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::RunTask RunTask} cannot be called
|
1604
|
+
# on a {Google::Cloud::Tasks::V2beta2::PullMessage pull task}.
|
1577
1605
|
#
|
1578
1606
|
# @param name [String]
|
1579
1607
|
# Required.
|
@@ -1581,18 +1609,19 @@ module Google
|
|
1581
1609
|
# The task name. For example:
|
1582
1610
|
# `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
|
1583
1611
|
# @param response_view [Google::Cloud::Tasks::V2beta2::Task::View]
|
1584
|
-
# The response_view specifies which subset of the
|
1585
|
-
# returned.
|
1586
|
-
#
|
1587
|
-
# By default response_view is
|
1588
|
-
#
|
1589
|
-
#
|
1590
|
-
#
|
1591
|
-
# contains.
|
1592
|
-
#
|
1593
|
-
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
1594
|
-
# `cloudtasks.tasks.fullView` [Google
|
1595
|
-
# permission on the
|
1612
|
+
# The response_view specifies which subset of the
|
1613
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} will be returned.
|
1614
|
+
#
|
1615
|
+
# By default response_view is
|
1616
|
+
# {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all information is
|
1617
|
+
# retrieved by default because some data, such as payloads, might be
|
1618
|
+
# desirable to return only when needed because of its large size or because
|
1619
|
+
# of the sensitivity of data that it contains.
|
1620
|
+
#
|
1621
|
+
# Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL}
|
1622
|
+
# requires `cloudtasks.tasks.fullView` [Google
|
1623
|
+
# IAM](https://cloud.google.com/iam/) permission on the
|
1624
|
+
# {Google::Cloud::Tasks::V2beta2::Task Task} resource.
|
1596
1625
|
# @param options [Google::Gax::CallOptions]
|
1597
1626
|
# Overrides the default settings for this call, e.g, timeout,
|
1598
1627
|
# retries, etc.
|