def plugins_update():
 for env in PluginGlobals.env_registry.values():
  for service in env.services.copy():
   if (service.__class__ not in _PLUGINS_CLASS):
    service.deactivate()
 import ckan.config.environment as environment
 environment.update_config()

def plugins_update ( ) : for env in PluginGlobals . env_registry . values ( ) : for service in env . services . copy ( ) : if ( service . __class__ not in _PLUGINS_CLASS ) : service . deactivate ( ) import ckan . config . environment as environment environment . update_config ( )
this is run when plugins have been loaded or unloaded and allows us to run any specific code to ensure that the new plugin setting are correctly setup .