lib/google/cloud/workflows/v1/workflows/operations.rb in google-cloud-workflows-v1-1.0.2 vs lib/google/cloud/workflows/v1/workflows/operations.rb in google-cloud-workflows-v1-1.1.0
- old
+ new
@@ -211,11 +211,11 @@
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -307,11 +307,11 @@
retry_policy: @config.retry_policy
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -396,11 +396,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -492,11 +491,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -590,11 +588,11 @@
retry_policy: @config.retry_policy
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -679,10 +677,15 @@
# @!attribute [rw] universe_domain
# The universe domain within which to make requests. This determines the
# default endpoint URL. The default value of nil uses the environment
# universe (usually the default "googleapis.com" universe).
# @return [::String,nil]
+ # @!attribute [rw] logger
+ # A custom logger to use for request/response debug logging, or the value
+ # `:default` (the default) to construct a default logger, or `nil` to
+ # explicitly disable logging.
+ # @return [::Logger,:default,nil]
#
class Configuration
extend ::Gapic::Config
# @private
@@ -703,9 +706,10 @@
config_attr :timeout, nil, ::Numeric, nil
config_attr :metadata, nil, ::Hash, nil
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
config_attr :quota_project, nil, ::String, nil
config_attr :universe_domain, nil, ::String, nil
+ config_attr :logger, :default, ::Logger, nil, :default
# @private
def initialize parent_config = nil
@parent_config = parent_config unless parent_config.nil?