def setup_app_for_worker(app, loglevel, logfile):
 app.finalize()
 app.set_current()
 app.set_default()
 type(app.log)._setup = False
 app.log.setup(loglevel=loglevel, logfile=logfile)

def setup_app_for_worker ( app , loglevel , logfile ) : app . finalize ( ) app . set_current ( ) app . set_default ( ) type ( app . log ) . _setup = False app . log . setup ( loglevel = loglevel , logfile = logfile )
setup the app to be used for starting an embedded worker .