@memoize('get_step_states', time=60, timeout=60)
def get_step_states(emr_connection, jobflowid):
 ret = emr_connection.list_steps(jobflowid)
 steps = []
 steps.extend(ret.steps)
 while hasattr(ret, 'marker'):
  ret = emr_connection.list_steps(jobflowid, marker=ret.marker)
  steps.extend(ret.steps)
 ret = []
 for step in steps:
  start_str = step.status.timeline.creationdatetime
  ret.append((step.name, step.status.state, start_str))
 return ret

@ memoize ( 'get_step_states' , time = 60 , timeout = 60 ) def get_step_states ( emr_connection , jobflowid ) : ret = emr_connection . list_steps ( jobflowid ) steps = [ ] steps . extend ( ret . steps ) while hasattr ( ret , 'marker' ) : ret = emr_connection . list_steps ( jobflowid , marker = ret . marker ) steps . extend ( ret . steps ) ret = [ ] for step in steps : start_str = step . status . timeline . creationdatetime ret . append ( ( step . name , step . status . state , start_str ) ) return ret
return the names and states of all steps in the jobflow .