Revision e2b4a7ba lib/jqueue.py

b/lib/jqueue.py
59 59
from ganeti import ht
60 60
from ganeti import query
61 61
from ganeti import qlang
62
from ganeti import pathutils
62 63

  
63 64

  
64 65
JOBQUEUE_THREADS = 25
......
1680 1681
    files = [self._GetJobPath(job_id) for job_id in self._GetJobIDsUnlocked()]
1681 1682

  
1682 1683
    # Upload current serial file
1683
    files.append(constants.JOB_QUEUE_SERIAL_FILE)
1684
    files.append(pathutils.JOB_QUEUE_SERIAL_FILE)
1684 1685

  
1685 1686
    # Static address list
1686 1687
    addrs = [node.primary_ip]
......
1813 1814
    serial = self._last_serial + count
1814 1815

  
1815 1816
    # Write to file
1816
    self._UpdateJobQueueFile(constants.JOB_QUEUE_SERIAL_FILE,
1817
    self._UpdateJobQueueFile(pathutils.JOB_QUEUE_SERIAL_FILE,
1817 1818
                             "%s\n" % serial, True)
1818 1819

  
1819 1820
    result = [jstore.FormatJobID(v)
......
1836 1837
    @return: the path to the job file
1837 1838

  
1838 1839
    """
1839
    return utils.PathJoin(constants.QUEUE_DIR, "job-%s" % job_id)
1840
    return utils.PathJoin(pathutils.QUEUE_DIR, "job-%s" % job_id)
1840 1841

  
1841 1842
  @staticmethod
1842 1843
  def _GetArchivedJobPath(job_id):
......
1848 1849
    @return: the path to the archived job file
1849 1850

  
1850 1851
    """
1851
    return utils.PathJoin(constants.JOB_QUEUE_ARCHIVE_DIR,
1852
    return utils.PathJoin(pathutils.JOB_QUEUE_ARCHIVE_DIR,
1852 1853
                          jstore.GetArchiveDirectory(job_id),
1853 1854
                          "job-%s" % job_id)
1854 1855

  
......
1867 1868

  
1868 1869
    """
1869 1870
    jlist = []
1870
    for filename in utils.ListVisibleFiles(constants.QUEUE_DIR):
1871
    for filename in utils.ListVisibleFiles(pathutils.QUEUE_DIR):
1871 1872
      m = constants.JOB_FILE_RE.match(filename)
1872 1873
      if m:
1873 1874
        jlist.append(int(m.group(1)))

Also available in: Unified diff