server.py 文件源码

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

项目:django-gateone 作者: jimmy201602 项目源码 文件源码
def watch_file(cls, path, func):
        """
        A classmethod that registers the given file *path* and *func* in
        `ApplicationWebSocket.watched_files` and
        `ApplicationWebSocket.file_update_funcs`, respectively.  The given
        *func* will be called (by `ApplicationWebSocket.file_checker`) whenever
        the file at *path* is modified.
        """
        logging.debug("watch_file('{path}', {func}())".format(
            path=path, func=func.__name__))
        cls.watched_files.update({path: os.stat(path).st_mtime})
        cls.file_update_funcs.update({path: func})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号