diff --git a/pubsub/cloud-client/subscriber.py b/pubsub/cloud-client/subscriber.py index 0d328d232d05..79c9bc4a0aaa 100644 --- a/pubsub/cloud-client/subscriber.py +++ b/pubsub/cloud-client/subscriber.py @@ -484,17 +484,24 @@ def callback(message): "receive", help=receive_messages.__doc__ ) receive_parser.add_argument("subscription_name") + receive_parser.add_argument("--timeout", default=None, type=float) receive_with_custom_attributes_parser = subparsers.add_parser( "receive-custom-attributes", help=receive_messages_with_custom_attributes.__doc__, ) receive_with_custom_attributes_parser.add_argument("subscription_name") + receive_with_custom_attributes_parser.add_argument( + "--timeout", default=None, type=float + ) receive_with_flow_control_parser = subparsers.add_parser( "receive-flow-control", help=receive_messages_with_flow_control.__doc__ ) receive_with_flow_control_parser.add_argument("subscription_name") + receive_with_flow_control_parser.add_argument( + "--timeout", default=None, type=float + ) synchronous_pull_parser = subparsers.add_parser( "receive-synchronously", help=synchronous_pull.__doc__ @@ -513,6 +520,9 @@ def callback(message): "listen_for_errors", help=listen_for_errors.__doc__ ) listen_for_errors_parser.add_argument("subscription_name") + listen_for_errors_parser.add_argument( + "--timeout", default=None, type=float + ) args = parser.parse_args()