Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit 668c9b2

Browse files
authored
Merge pull request #1115 from andrewsg/tasks-update
Add required flag on certain arguments to command-line tools
2 parents 60f52ff + 3b2a2b5 commit 668c9b2

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

samples/snippets/pull_queue_snippets.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,31 +105,37 @@ def acknowledge_task(task):
105105
help=create_task.__doc__)
106106
create_task_parser.add_argument(
107107
'--project',
108-
help='Project of the queue to add the task to.'
108+
help='Project of the queue to add the task to.',
109+
required=True,
109110
)
110111
create_task_parser.add_argument(
111112
'--queue',
112-
help='ID (short name) of the queue to add the task to.'
113+
help='ID (short name) of the queue to add the task to.',
114+
required=True,
113115
)
114116
create_task_parser.add_argument(
115117
'--location',
116-
help='Location of the queue to add the task to.'
118+
help='Location of the queue to add the task to.',
119+
required=True,
117120
)
118121

119122
pull_and_ack_parser = subparsers.add_parser(
120123
'pull-and-ack-task',
121124
help=create_task.__doc__)
122125
pull_and_ack_parser.add_argument(
123126
'--project',
124-
help='Project of the queue to pull the task from.'
127+
help='Project of the queue to pull the task from.',
128+
required=True,
125129
)
126130
pull_and_ack_parser.add_argument(
127131
'--queue',
128-
help='ID (short name) of the queue to pull the task from.'
132+
help='ID (short name) of the queue to pull the task from.',
133+
required=True,
129134
)
130135
pull_and_ack_parser.add_argument(
131136
'--location',
132-
help='Location of the queue to pull the task from.'
137+
help='Location of the queue to pull the task from.',
138+
required=True,
133139
)
134140

135141
args = parser.parse_args()

0 commit comments

Comments
 (0)