def wrapper(func): if func.__module__ != '__main__': return func import mitogen.master import mitogen.utils mitogen.master.Router.profiling = profiling utils.log_to_file(level=log_level) return utils.run_with_router(func)
def wrapper(func): if func.__module__ != '__main__': return func import mitogen.parent import mitogen.utils if profiling: mitogen.core.enable_profiling() mitogen.master.Router.profiling = profiling utils.log_to_file(level=log_level) return mitogen.core._profile_hook( 'main', utils.run_with_router, func, )
def wrapper(func): if func.__module__ != '__main__': return func from mitogen import utils utils.log_to_file(level=log_level) return utils.run_with_router(func)