mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
initial commit for cleanup plugin, non active
This commit is contained in:
parent
f4fcdfb148
commit
e0d9cecf7c
1 changed files with 20 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
|||
import os
|
||||
|
||||
from pyblish import api
|
||||
|
||||
|
||||
class CleanUp(api.InstancePlugin):
|
||||
"""Cleans up the staging directory after a successful publish
|
||||
|
||||
"""
|
||||
|
||||
order = api.IntegratorOrder + 10
|
||||
|
||||
def process(self, instance):
|
||||
return
|
||||
|
||||
def clean_up(self, instance):
|
||||
staging_dir = instance.get("stagingDir", None)
|
||||
if staging_dir and os.path.exists(staging_dir):
|
||||
self.log.info("Removing temporary folder ...")
|
||||
os.rmdir(staging_dir)
|
||||
Loading…
Add table
Add a link
Reference in a new issue