def setup_worker_optimizations(app, hostname=None):
 global trace_task_ret
 hostname = (hostname or gethostname())
 _install_stack_protection()
 app.set_current()
 app.set_default()
 app.finalize()
 _localized[:] = [app._tasks, prepare_accept_content(app.conf.accept_content), hostname]
 trace_task_ret = _fast_trace_task
 from celery.worker import request as request_module
 request_module.trace_task_ret = _fast_trace_task
 request_module.__optimize__()

def setup_worker_optimizations ( app , hostname = None ) : global trace_task_ret hostname = ( hostname or gethostname ( ) ) _install_stack_protection ( ) app . set_current ( ) app . set_default ( ) app . finalize ( ) _localized [ : ] = [ app . _tasks , prepare_accept_content ( app . conf . accept_content ) , hostname ] trace_task_ret = _fast_trace_task from celery . worker import request as request_module request_module . trace_task_ret = _fast_trace_task request_module . __optimize__ ( )
setup worker related optimizations .