schedule.py 文件源码

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

项目:BioQueue 作者: liyao001 项目源码 文件源码
def do(self, job_func, *args, **kwargs):
        """Specifies the job_func that should be called every time the
        job runs.
        Any additional arguments are passed on to job_func when
        the job runs.
        """
        self.job_func = functools.partial(job_func, *args, **kwargs)
        try:
            functools.update_wrapper(self.job_func, job_func)
        except AttributeError:
            # job_funcs already wrapped by functools.partial won't have
            # __name__, __module__ or __doc__ and the update_wrapper()
            # call will fail.
            pass
        self._schedule_next_run()
        return self
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号