python.external_config.external_config_loader module¶
-
class
ExternalConfigurationLoader(interpreter, engine_name, plugin_id, base_config, bg_task_manager, parent)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObjectClass for loading configurations across contexts.
Signal Interface
Signal configurations_loaded(project_id, configs): Gets emitted configurations have been loaded for the given project. The parameters passed is the project id and a list of ExternalConfigurationinstances. If errors occurred while loading configurations, the error property will be set to a tuple containing the error message and the traceback, in that order.Signal configurations_changed(): Gets emitted whenever the class has detected a change to the state of shotgun which could invalidate any existing ExternalConfigurationinstances. This can be emitted at startup or typically afterrefresh_shotgun_global_state()has been called. Any implementation which cachesExternalConfigurationinstances can use this signal to invalidate their caches.-
TASK_GROUP= 'tk-framework-shotgunutils.external_config.ExternalConfigurationLoader'¶
-
base_config_uri¶ Configuration URI string to be used when nothing is provided via Shotgun overrides.
-
configurations_changed¶ Used by autodoc_mock_imports.
-
configurations_loaded¶ Used by autodoc_mock_imports.
-
engine_name¶ The name of the engine associated with this external configuration loader.
-
interpreter¶ The Python interpreter to when bootstrapping and loading external configurations.
-
plugin_id¶ The plugin id which will be used when executing external requests.
-
refresh_shotgun_global_state()[source]¶ Requests an async refresh. If the State of Shotgun has changed in a way which may affect configurations, this will result in a
configurations_changedsignal being emitted.Examples of state changes which may affect configurations are any changes to related pipeline configuration, but also indirect changes such as a change to the list of software entities, since these can implicitly affect the list of commands associated with a project or entity.
-
request_configurations(project_id)[source]¶ Requests a list of configuration objects for the given project.
Emits a
configurations_loadedsignal when the configurations have been loaded.Note
If this method is called multiple times in quick succession, only a single
configurations_loadedsignal will be emitted, belonging to the last request.Parameters: project_id (int) – Project to request configurations for.
-
software_hash¶ Hash string representing the state of the software entity in Shotgun or None if not yet determined.
-