Пример #1
0
 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)
Пример #2
0
 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,
     )
Пример #3
0
 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,
     )
Пример #4
0
 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)