summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-10-10 11:03:52 +0200
committerJürg Billeter <j@bitron.ch>2019-10-15 09:43:08 +0200
commit3578f9207f60b62f6ad2a70f0a1e9b60940d0fc1 (patch)
treee549deb4dc1ccaeb284176bee97007f40d56f5d8
parent9e1b956a6b114b4a7b0c8ecd9bbcc8df133c33f4 (diff)
downloadbuildstream-3578f9207f60b62f6ad2a70f0a1e9b60940d0fc1.tar.gz
cascache.py: Rename close_channel() to close_grpc_channels()
This aligns the method name with has_open_grpc_channels().
-rw-r--r--src/buildstream/_cas/cascache.py6
-rw-r--r--src/buildstream/plugins/sources/workspace.py2
-rw-r--r--src/buildstream/source.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py
index e8af9d35b..83b8e8539 100644
--- a/src/buildstream/_cas/cascache.py
+++ b/src/buildstream/_cas/cascache.py
@@ -185,11 +185,11 @@ class CASCache():
def has_open_grpc_channels(self):
return bool(self._casd_channel)
- # close_channel():
+ # close_grpc_channels():
#
# Close the casd channel if it exists
#
- def close_channel(self):
+ def close_grpc_channels(self):
if self._casd_channel:
self._local_cas = None
self._casd_cas = None
@@ -205,7 +205,7 @@ class CASCache():
self._cache_usage_monitor.release_resources()
if self._casd_process:
- self.close_channel()
+ self.close_grpc_channels()
self._terminate_casd_process(messenger)
shutil.rmtree(self._casd_socket_tempdir)
diff --git a/src/buildstream/plugins/sources/workspace.py b/src/buildstream/plugins/sources/workspace.py
index 0e7797fe8..078ac3034 100644
--- a/src/buildstream/plugins/sources/workspace.py
+++ b/src/buildstream/plugins/sources/workspace.py
@@ -104,7 +104,7 @@ class WorkspaceSource(Source):
reason='ensure-stage-dir-fail')
self.__digest = self.__cas_dir._get_digest().hash
# now close down grpc channels
- cas.close_channel()
+ cas.close_grpc_channels()
assert not cas.has_open_grpc_channels()
return (self.path, self.__digest)
diff --git a/src/buildstream/source.py b/src/buildstream/source.py
index f4b682616..14307387a 100644
--- a/src/buildstream/source.py
+++ b/src/buildstream/source.py
@@ -1085,7 +1085,7 @@ class Source(Plugin):
sourcecache = self._get_context().sourcecache
if self.get_kind() == 'workspace' and not sourcecache.contains(self):
sourcecache.commit(self, [])
- sourcecache.cas.close_channel()
+ sourcecache.cas.close_grpc_channels()
assert not sourcecache.cas.has_open_grpc_channels()
@property