3737FULL_EXECUTION_COLUMNS = ['id' , 'workflow_id' , 'status_display' , 'is_dry_run' ,
3838 'deployment_id' , 'created_at' , 'ended_at' ,
3939 'error' , 'visibility' , 'tenant_name' ,
40- 'created_by' , 'started_at' ]
40+ 'created_by' , 'started_at' , 'scheduled_for' ]
4141MINIMAL_EXECUTION_COLUMNS = ['id' , 'workflow_id' , 'status_display' ,
4242 'is_dry_run' ,
4343 'deployment_id' , 'created_at' , 'started_at' ,
44- 'visibility' , 'tenant_name' ,
44+ 'scheduled_for' , ' visibility' , 'tenant_name' ,
4545 'created_by' ]
4646EXECUTION_TABLE_LABELS = {'status_display' : 'status' }
4747
@@ -168,6 +168,7 @@ def manager_list(
168168@cfy .options .wait_after_fail
169169@cfy .options .common_options
170170@cfy .options .tenant_name (required = False , resource_name_for_help = 'execution' )
171+ @cfy .options .schedule
171172@cfy .options .queue
172173@cfy .assert_manager_active ()
173174@cfy .pass_client ()
@@ -183,6 +184,7 @@ def manager_start(workflow_id,
183184 dry_run ,
184185 wait_after_fail ,
185186 queue ,
187+ schedule ,
186188 logger ,
187189 client ,
188190 tenant_name ):
@@ -209,7 +211,8 @@ def manager_start(workflow_id,
209211 force = force ,
210212 dry_run = dry_run ,
211213 queue = queue ,
212- wait_after_fail = wait_after_fail )
214+ wait_after_fail = wait_after_fail ,
215+ schedule = schedule )
213216 except (exceptions .DeploymentEnvironmentCreationInProgressError ,
214217 exceptions .DeploymentEnvironmentCreationPendingError ) as e :
215218 # wait for deployment environment creation workflow
@@ -242,12 +245,16 @@ def manager_start(workflow_id,
242245 force = force ,
243246 dry_run = dry_run ,
244247 queue = queue ,
245- wait_after_fail = wait_after_fail )
248+ wait_after_fail = wait_after_fail ,
249+ schedule = schedule )
246250
247251 if execution .status == 'queued' : # We don't need to wait for execution
248252 logger .info ('Execution is being queued. It will automatically'
249253 ' start when possible.' )
250254 return
255+ if execution .status == 'scheduled' :
256+ logger .info ('Execution is scheduled for {0}.' .format (schedule ))
257+ return
251258 execution = wait_for_execution (client ,
252259 execution ,
253260 events_handler = events_logger ,
0 commit comments