pipetteServer.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:firecloud_developer_toolkit 作者: broadinstitute 项目源码 文件源码
def __init__(self, commdir):
        # This code is run when starting a new instance, and not when the instance is unpickled.
        self._file_ext = '.launch.txt'
        self._job_by_jobId = {}
        self._commdir = commdir
        launch_subdir = 'launch'
        archive_subdir = 'archive'
        self._launch_dir = os.path.join(self._commdir, launch_subdir)
        self._archive_dir = os.path.join(self._commdir, archive_subdir)
        try:
            os.makedirs(self._launch_dir,exist_ok=True)
        except:
            raise Exception('Failed to create launchdir; communicationDirBase may be read-only')

        os.makedirs(self._archive_dir,exist_ok=True)

        existing_launchfiles = os.listdir(self._launch_dir)
        if existing_launchfiles:
            print ('Starting with ' + str(len(existing_launchfiles)) + ' launched but unprocessed pipelines.')
        else:
            print ('Starting with 0 pipelines')
        existing_archivefiles = os.listdir(self._archive_dir)
        if len(existing_archivefiles) > 0:
            raise Exception ('starting with ' + str(len(existing_archivefiles)) + ' in-process jobs... either these should be purged from:' + 
                             self._archive_dir + ' or things shoud be restarted from the persisted state')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号