docs: def Jobs():
      """
      Get the number of jobs that are running and finished, and the number of
      total tools running and finished for those jobs
      """
      jobs = [0, 0, 0, 0]
  
      # get running jobs
      try:
          d_client = docker.from_env()
          c = d_client.containers.list(all=False,
                                       filters={'label': 'vent-plugin'})
          files = []
          for container in c:
              jobs[1] += 1
              if 'file' in container.attrs['Config']['Labels']:
                  if container.attrs['Config']['Labels']['file'] not in files:
                      files.append(container.attrs['Config']['Labels']['file'])
          jobs[0] = len(files)
      except Exception as e:  # pragma: no cover
          logger.error('Could not get running jobs ' + str(e))
  
      # get finished jobs
      try:
          d_client = docker.from_env()
          c = d_client.containers.list(all=True,
                                       filters={'label': 'vent-plugin',
                                                'status': 'exited'})
  
          file_names = []
          tool_names = []
          finished_jobs = []
          path_dirs = PathDirs()
          manifest = join(path_dirs.meta_dir, 'status.json')
  
          if exists(manifest):
              file_status = 'a'
          else:
              file_status = 'w'
  
          # get a list of past jobs' file names if status.json exists
          if file_status == 'a':
              with open(manifest, 'r') as infile:
                  for line in infile:
                      finished_jobs.append(json.loads(line))
  
              # get a list of file names so we can check against each container
              file_names = [d['FileName'] for d in finished_jobs]
  
              # multiple tools can run on 1 file. Use a tuple to status check
              tool_names = [(d['FileName'], d['VentPlugin'])
                            for d in finished_jobs]
  
          for container in c:
              jobs[3] += 1
  
              if 'file' in container.attrs['Config']['Labels']:
                  # make sure the file name and the tool tup exists because
                  # multiple tools can run on 1 file.
                  if (container.attrs['Config']['Labels']['file'],
                      container.attrs['Config']['Labels']['vent.name']) not in \
                          tool_names:
                      # TODO figure out a nicer way of getting desired values
                      # from containers.attrs.
                      new_file = {}
                      new_file['FileName'] = \
                          container.attrs['Config']['Labels']['file']
                      new_file['VentPlugin'] = \
                          container.attrs['Config']['Labels']['vent.name']
                      new_file['StartedAt'] = \
                          container.attrs['State']['StartedAt']
                      new_file['FinishedAt'] = \
                          container.attrs['State']['FinishedAt']
                      new_file['ID'] = \
                          container.attrs['Id'][:12]
  
                      # create/append a json file with all wanted information
                      with open(manifest, file_status) as outfile:
                          json.dump(new_file, outfile)
                          outfile.write('\n')
  
                  # delete any containers with 'vent-plugin' in the groups
                  if 'vent-plugin' in container.attrs['Config']['Labels']:
                      container.remove()
  
          # add extra one to account for file that just finished if the file was
          # just created since file_names is processed near the beginning
          if file_status == 'w' and len(file_names) == 1:
              jobs[2] = len(set(file_names)) + 1
          else:
              jobs[2] = len(set(file_names))
  
          jobs[3] = jobs[3] - jobs[1]
  
      except Exception as e:  # pragma: no cover
          logger.error('Could not get finished jobs ' + str(e))
  
      return tuple(jobs)