code: def _walk_through(job_dir, display_progress=False):
      '''
      Walk through the job dir and return jobs
      '''
      serial = salt.payload.Serial(__opts__)
  
      for top in os.listdir(job_dir):
          t_path = os.path.join(job_dir, top)
  
          for final in os.listdir(t_path):
              load_path = os.path.join(t_path, final, '.load.p')
              with salt.utils.files.fopen(load_path, 'rb') as rfh:
                  job = serial.load(rfh)
  
              if not os.path.isfile(load_path):
                  continue
  
              with salt.utils.files.fopen(load_path, 'rb') as rfh:
                  job = serial.load(rfh)
              jid = job['jid']
              if display_progress:
                  __jid_event__.fire_event(
                      {'message': 'Found JID {0}'.format(jid)},
                      'progress'
                  )
              yield jid, job, t_path, finaf _walk_through(job_dir, display_progress=False):
      '''
      Walk through the job dir and return jobs
      '''
      serial = salt.payload.Serial(__opts__)
  
      for top in os.listdir(job_dir):
          t_path = os.path.join(job_dir, top)
  
          for final in os.listdir(t_path):
              load_path = os.path.join(t_path, final, '.load.p')
              with salt.utils.files.fopen(load_path, 'rb') as rfh:
                  job = serial.load(rfh)
  
              if not os.path.isfile(load_path):
                  continue
  
              with salt.utils.files.fopen(load_path, 'rb') as rfh:
                  job = serial.load(rfh)
              jid = job['jid']
              if display_progress:
                  __jid_event__.fire_event(
                      {'message': 'Found JID {0}'.format(jid)},
                      'progress'
                  )
              yield jid, job, t_path, final
docs: Walk through the job dir and return jobs