application.py 文件源码

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

项目:hienoi 作者: christophercrouzet 项目源码 文件源码
def _process_wrapper(function, upwards, profile, *args, **kwargs):
    """Wrap a process with additional features."""
    try:
        if profile:
            _run_profiler(function, *args, **kwargs)
        else:
            function(*args, **kwargs)
    except Exception:
        process = multiprocessing.current_process()
        info = sys.exc_info()
        exception = traceback.format_exception(
            info[0], info[1], info[2].tb_next)
        _send_message(upwards, _MESSAGE_ERROR,
                      process_id=process.pid,
                      process_name=process.name,
                      message=''.join(exception).rstrip())
    finally:
        upwards.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号