def _est_time_to_hour(cluster_summary, now=None):
 if (now is None):
  now = datetime.utcnow()
 timeline = getattr(getattr(cluster_summary, 'status', None), 'timeline', None)
 creationdatetime = getattr(timeline, 'creationdatetime', None)
 if creationdatetime:
  start = iso8601_to_datetime(creationdatetime)
 else:
  return timedelta(minutes=60)
 run_time = (now - start)
 return timedelta(seconds=(((- run_time).seconds % 3600.0) or 3600.0))

def _est_time_to_hour ( cluster_summary , now = None ) : if ( now is None ) : now = datetime . utcnow ( ) timeline = getattr ( getattr ( cluster_summary , 'status' , None ) , 'timeline' , None ) creationdatetime = getattr ( timeline , 'creationdatetime' , None ) if creationdatetime : start = iso8601_to_datetime ( creationdatetime ) else : return timedelta ( minutes = 60 ) run_time = ( now - start ) return timedelta ( seconds = ( ( ( - run_time ) . seconds % 3600.0 ) or 3600.0 ) )
how long before job reaches the end of the next full hour since it began .