(tasks)
Sort tasks by 'most recent first'.
Sort tasks by 'most recent first'.
Sort tasks by most recent first .
def _sort_tasks(tasks):
  """Sort tasks by 'most recent first'."""

  # The local provider can launch tasks quickly enough that they end up with
  # the same timestamp.
  #
  # lookup_job_tasks needs to return tasks sorted: "most recent first".
  # Sort the list of tasks by:
  # - create time (descending)
  # - task-id (descending, if any)

  tasks.sort(key=_task_sort_function, reverse=True)
def _sort_tasks ( tasks ) : # The local provider can launch tasks quickly enough that they end up with # the same timestamp. # # lookup_job_tasks needs to return tasks sorted: "most recent first". # Sort the list of tasks by: # - create time (descending) # - task-id (descending, if any) tasks . sort ( key = _task_sort_function , reverse = True )