From 005fa46744000b43afc50e885c2197cd62138a41 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Wed, 5 Jan 2022 15:47:34 +0100 Subject: [PATCH] added few more logs --- openpype/plugins/publish/cleanup_farm.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openpype/plugins/publish/cleanup_farm.py b/openpype/plugins/publish/cleanup_farm.py index 2ca3926098..51bc216e73 100644 --- a/openpype/plugins/publish/cleanup_farm.py +++ b/openpype/plugins/publish/cleanup_farm.py @@ -23,6 +23,7 @@ class CleanUpFarm(pyblish.api.ContextPlugin): def process(self, context): # Get source host from which farm publishing was started src_host_name = avalon.api.Session.get("AVALON_APP") + self.log.debug("Host name from session is {}".format(src_host_name)) # Skip process if is not in list of source hosts in which this # plugin should run if src_host_name not in self.allowed_hosts: @@ -32,6 +33,7 @@ class CleanUpFarm(pyblish.api.ContextPlugin): ).format(str(src_host_name), str(self.allowed_hosts))) return + self.log.debug("Preparing filepaths to remove") # Collect directories to remove dirpaths_to_remove = set() for instance in context: @@ -39,6 +41,14 @@ class CleanUpFarm(pyblish.api.ContextPlugin): if staging_dir: dirpaths_to_remove.add(os.path.normpath(staging_dir)) + if not dirpaths_to_remove: + self.log.info("Nothing to remove. Skipping") + return + + self.log.debug("Filepaths to remove are:\n{}".format( + "\n".join(["- {}".format(path) for path in dirpaths_to_remove]) + )) + # clean dirs which are empty for dirpath in dirpaths_to_remove: if not os.path.exists(dirpath):