def update_configurable(self, configurable_class, name, config):
configurable_class_name = configurable_class.__name__.lower()<EOL>logger.info(<EOL>"<STR_LIT>", configurable_class_name, name<EOL>)<EOL>registry = self.registry_for(configurable_class)<EOL>if name not in registry:<EOL><INDENT>logger.warn(<EOL>"<STR_LIT>",<EOL>configurable_class_name, name<EOL>)<EOL>self.add_configurable(<EOL>configurable_class,<EOL>configurable_class.from_config(name, config)<EOL>)<EOL>return<EOL><DEDENT>registry[name].apply_config(config)<EOL>hook = self.hook_for(configurable_class, "<STR_LIT>")<EOL>if not hook:<EOL><INDENT>return<EOL><DEDENT>def done(f):<EOL><INDENT>try:<EOL><INDENT>f.result()<EOL><DEDENT>except Exception:<EOL><INDENT>logger.exception("<STR_LIT>", name)<EOL><DEDENT><DEDENT>self.work_pool.submit(hook, name, config).add_done_callback(done)<EOL>
Callback fired when a configurable instance is updated.

Looks up the existing configurable in the proper "registry" and
`apply_config()` is called on it.

If a method named "on_<configurable classname>_update" is defined it
is called in the work pool and passed the configurable's name, the old
config and the new config.

If the updated configurable is not present, `add_configurable()` is
called instead.