def on_preload_parsed(options, **kwargs): """ Parse user options for celery. It only configures the environment if a pylons ini file is provided, else it does nothing. """ if 'pylons_ini_file' in options: # Get the filename of the pylons ini file provided pylons_config = os.path.realpath(options['pylons_ini_file']) # Configure the pylons environment with the pylons config _configure_pylons(pylons_config)
def bootstrap_config(self, conf): """ Loads the pylons configuration. """ path_to_ini_file = os.path.realpath(conf) _configure_pylons(path_to_ini_file)