scheduler.py 文件源码

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

项目:spc 作者: whbrewer 项目源码 文件源码
def __init__(self):
        # if any jobs marked in run state when scheduler starts
        # replace their state with X to mark that they have been shutdown
        db = DAL(config.uri, auto_import=True, migrate=False, folder=config.dbdir)
        myset = db(db.jobs.state == STATE_RUN)
        myset.update(state=STATE_STOPPED)
        db.commit()
        self.sem = BoundedSemaphore(config.np)
        self.mutex = Lock()
        # set time zone
        try:
            os.environ['TZ'] = config.time_zone
            time.tzset()
        except: pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号