def set_runfolder_state(runfolder, state):
     """Sets the state of a runfolder"""
     validate_state(state)
     arteria_dir = os.path.join(runfolder, ".arteria")
     state_file = os.path.join(arteria_dir, "state")
     if not os.path.exists(arteria_dir):
         os.makedirs(arteria_dir)
     with open(state_file, 'w') as f:
         f.write(state)
예제 #2
0
 def set_runfolder_state(runfolder, state):
     """Sets the state of a runfolder"""
     validate_state(state)
     arteria_dir = os.path.join(runfolder, ".arteria")
     state_file = os.path.join(arteria_dir, "state")
     if not os.path.exists(arteria_dir):
         os.makedirs(arteria_dir)
     with open(state_file, "w") as f:
         f.write(state)
예제 #3
0
 def list_runfolders(self, state):
     """
     Lists all the runfolders on the host, filtered by state. State
     can be any of the values in RunfolderState. Specify None for no filtering.
     """
     runfolders = self._enumerate_runfolders()
     if state:
         validate_state(state)
         return (runfolder for runfolder in runfolders if runfolder.state == state)
     else:
         return runfolders
 def list_runfolders(self, state):
     """
     Lists all the runfolders on the host, filtered by state. State
     can be any of the values in RunfolderState. Specify None for no filtering.
     """
     runfolders = self._enumerate_runfolders()
     if state:
         validate_state(state)
         return (runfolder for runfolder in runfolders
                 if runfolder.state == state)
     else:
         return runfolders