mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
added few more logs
This commit is contained in:
parent
cef9831c4f
commit
005fa46744
1 changed files with 10 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue