lordgamez commented on a change in pull request #1121:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1121#discussion_r680783600



##########
File path: docker/test/integration/minifi/core/Container.py
##########
@@ -0,0 +1,102 @@
+import docker
+import logging
+import tarfile
+from io import BytesIO
+
+
+class Container:
+    def __init__(self, name, engine, vols, network):
+        self.name = name
+        self.engine = engine
+        self.vols = vols
+        self.network = network
+
+        # Get docker client
+        self.client = docker.from_env()
+        self.image = None
+        self.deployed = False
+
+    def __del__(self):
+        self.cleanup()
+
+    def cleanup(self):
+        logging.info('Cleaning up container: %s', self.name)
+        try:
+            self.client.containers.get(self.name).remove(v=True, force=True)
+        except docker.errors.NotFound:

Review comment:
       It shouldn't cause any problems if there is this happens, but I added a 
warning to see if there is a duplicate cleanup in 
489cbf0e0a080478182ba51fe7235c18536e79cb




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to