Revision 5d672980 lib/backend.py

b/lib/backend.py
1773 1773
  return True
1774 1774

  
1775 1775

  
1776
def JobQueueSetDrainFlag(drain_flag):
1777
  """Set the drain flag for the queue.
1778

  
1779
  This will set or unset the queue drain flag.
1780

  
1781
  @type drain_flag: bool
1782
  @param drain_flag: if True, will set the drain flag, otherwise reset it.
1783

  
1784
  """
1785
  if drain_flag:
1786
    utils.WriteFile(constants.JOB_QUEUE_DRAIN_FILE, data="", close=True)
1787
  else:
1788
    utils.RemoveFile(constants.JOB_QUEUE_DRAIN_FILE)
1789

  
1790
  return True
1791

  
1792

  
1776 1793
def CloseBlockDevices(disks):
1777 1794
  """Closes the given block devices.
1778 1795

  

Also available in: Unified diff