jobqueue.py 文件源码

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

项目:mobot 作者: JokerQyou 项目源码 文件源码
def put(self, job, next_t=None):
        """Queue a new job.

        Args:
            job (telegram.ext.Job): The ``Job`` instance representing the new job
            next_t (Optional[int, float, datetime.timedelta, datetime.datetime, datetime.time]):
                Time in or at which the job should run for the first time. This parameter will be
                interpreted depending on its type.
                ``int`` or ``float`` will be interpreted as "seconds from now" in which the job
                should run.
                ``datetime.timedelta`` will be interpreted as "time from now" in which the job
                should run.
                ``datetime.datetime`` will be interpreted as a specific date and time at which the
                job should run.
                ``datetime.time`` will be interpreted as a specific time at which the job should
                run. This could be either today or, if the time has already passed, tomorrow.
        """
        warnings.warn("'JobQueue.put' is being deprecated, use 'JobQueue.run_once', "
                      "'JobQueue.run_daily' or 'JobQueue.run_repeating' instead")
        if job.job_queue is None:
            job.job_queue = self
        self._put(job, next_t=next_t)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号