def process_initializer(app, hostname):
 _set_task_join_will_block(True)
 platforms.signals.reset(*WORKER_SIGRESET)
 platforms.signals.ignore(*WORKER_SIGIGNORE)
 platforms.set_mp_process_title(u'celeryd', hostname=hostname)
 app.loader.init_worker()
 app.loader.init_worker_process()
 logfile = (os.environ.get(u'CELERY_LOG_FILE') or None)
 if (logfile and (u'%i' in logfile.lower())):
  app.log.already_setup = False
 app.log.setup(int((os.environ.get(u'CELERY_LOG_LEVEL', 0) or 0)), logfile, bool(os.environ.get(u'CELERY_LOG_REDIRECT', False)), str(os.environ.get(u'CELERY_LOG_REDIRECT_LEVEL')), hostname=hostname)
 if os.environ.get(u'FORKED_BY_MULTIPROCESSING'):
  trace.setup_worker_optimizations(app, hostname)
 else:
  app.set_current()
  set_default_app(app)
  app.finalize()
  trace._tasks = app._tasks
 from celery.app.trace import build_tracer
 for (name, task) in items(app.tasks):
  task.__trace__ = build_tracer(name, task, app.loader, hostname, app=app)
 from celery.worker import state as worker_state
 worker_state.reset_state()
 signals.worker_process_init.send(sender=None)

def process_initializer ( app , hostname ) : _set_task_join_will_block ( True ) platforms . signals . reset ( * WORKER_SIGRESET ) platforms . signals . ignore ( * WORKER_SIGIGNORE ) platforms . set_mp_process_title ( u'celeryd' , hostname = hostname ) app . loader . init_worker ( ) app . loader . init_worker_process ( ) logfile = ( os . environ . get ( u'CELERY_LOG_FILE' ) or None ) if ( logfile and ( u'%i' in logfile . lower ( ) ) ) : app . log . already_setup = False app . log . setup ( int ( ( os . environ . get ( u'CELERY_LOG_LEVEL' , 0 ) or 0 ) ) , logfile , bool ( os . environ . get ( u'CELERY_LOG_REDIRECT' , False ) ) , str ( os . environ . get ( u'CELERY_LOG_REDIRECT_LEVEL' ) ) , hostname = hostname ) if os . environ . get ( u'FORKED_BY_MULTIPROCESSING' ) : trace . setup_worker_optimizations ( app , hostname ) else : app . set_current ( ) set_default_app ( app ) app . finalize ( ) trace . _tasks = app . _tasks from celery . app . trace import build_tracer for ( name , task ) in items ( app . tasks ) : task . __trace__ = build_tracer ( name , task , app . loader , hostname , app = app ) from celery . worker import state as worker_state worker_state . reset_state ( ) signals . worker_process_init . send ( sender = None )
initializes the process so it can be used to process tasks .