Revision d2c8afb1 lib/jqueue.py

b/lib/jqueue.py
1321 1321
    all_job_ids = self._GetJobIDsUnlocked(archived=False)
1322 1322
    pending = []
1323 1323
    for idx, job_id in enumerate(all_job_ids):
1324
      last_touched = idx
1324
      last_touched = idx + 1
1325 1325

  
1326 1326
      # Not optimal because jobs could be pending
1327 1327
      # TODO: Measure average duration for job archival and take number of
......
1351 1351
    if pending:
1352 1352
      archived_count += self._ArchiveJobsUnlocked(pending)
1353 1353

  
1354
    return (archived_count, len(all_job_ids) - last_touched - 1)
1354
    return (archived_count, len(all_job_ids) - last_touched)
1355 1355

  
1356 1356
  @staticmethod
1357 1357
  def _GetJobInfoUnlocked(job, fields):

Also available in: Unified diff