diff options
author | Jürg Billeter <j@bitron.ch> | 2019-09-02 09:03:37 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-09-03 11:17:28 +0200 |
commit | 418c304de0ecebe588d5c80efac748b33c69cfbc (patch) | |
tree | c352cf1c8913e75d821b1bbbd0653a201e94b6c7 | |
parent | 733cbfafffd79873f401a198d2986fc82773f57e (diff) | |
download | buildstream-418c304de0ecebe588d5c80efac748b33c69cfbc.tar.gz |
_basecache.py: Add release_resources() method
-rw-r--r-- | src/buildstream/_basecache.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/buildstream/_basecache.py b/src/buildstream/_basecache.py index 46de29f7b..431a7304e 100644 --- a/src/buildstream/_basecache.py +++ b/src/buildstream/_basecache.py @@ -59,6 +59,16 @@ class BaseCache(): self._has_fetch_remotes = False self._has_push_remotes = False + # release_resources(): + # + # Release resources used by BaseCache. + # + def release_resources(self): + # Close all remotes and their gRPC channels + for project_remotes in self._remotes.values(): + for remote in project_remotes: + remote.close() + # specs_from_config_node() # # Parses the configuration of remote artifact caches from a config block. |