From bfd2ad65cf2877f245192ba8d28548ae1edc0ad2 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 28 Jul 2021 18:10:09 +0200 Subject: [PATCH] Webpublisher - backend - hound --- openpype/hosts/webpublisher/api/__init__.py | 2 +- .../plugins/publish/collect_published_files.py | 3 +-- openpype/modules/webserver/webserver_cli.py | 3 +-- openpype/pype_commands.py | 9 +++------ 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/openpype/hosts/webpublisher/api/__init__.py b/openpype/hosts/webpublisher/api/__init__.py index 908c9b10be..1b6edcf24d 100644 --- a/openpype/hosts/webpublisher/api/__init__.py +++ b/openpype/hosts/webpublisher/api/__init__.py @@ -29,8 +29,8 @@ def install(): avalon.on("application.launched", application_launch) + def uninstall(): pyblish.deregister_plugin_path(PUBLISH_PATH) avalon.deregister_plugin_path(avalon.Loader, LOAD_PATH) avalon.deregister_plugin_path(avalon.Creator, CREATE_PATH) - diff --git a/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py b/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py index 69d30e06e1..dde9713c7a 100644 --- a/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py +++ b/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py @@ -169,7 +169,7 @@ class CollectPublishedFiles(pyblish.api.ContextPlugin): "manifest.json")) self.log.info("task_data:: {}".format(task_data)) ctx = task_data["context"] - asset = subset = task = task_type = None + task_type = None subset = "Main" # temp if ctx["type"] == "task": @@ -289,4 +289,3 @@ class CollectPublishedFiles(pyblish.api.ContextPlugin): ) self._process_batch(batch_dir) - diff --git a/openpype/modules/webserver/webserver_cli.py b/openpype/modules/webserver/webserver_cli.py index 04d0002787..484c25c6b3 100644 --- a/openpype/modules/webserver/webserver_cli.py +++ b/openpype/modules/webserver/webserver_cli.py @@ -165,7 +165,7 @@ class WebpublisherPublishEndpoint(_RestApiEndpoint): print("args:: {}".format(args)) - exit_code = subprocess.call(args, shell=True) + _exit_code = subprocess.call(args, shell=True) return Response( status=200, body=self.resource.encode(output), @@ -279,4 +279,3 @@ def run_webserver(*args, **kwargs): webserver_module.start_server() while True: time.sleep(0.5) - diff --git a/openpype/pype_commands.py b/openpype/pype_commands.py index 24becd2423..01fa6b8d33 100644 --- a/openpype/pype_commands.py +++ b/openpype/pype_commands.py @@ -191,8 +191,7 @@ class PypeCommands: "finish_date": datetime.now(), "status": "error", "msg": error_format.format(**result) - } - } + }} ) sys.exit(1) else: @@ -201,8 +200,7 @@ class PypeCommands: {"$set": { "progress": result["progress"] - } - } + }} ) dbcon.update_one( @@ -212,8 +210,7 @@ class PypeCommands: "finish_date": datetime.now(), "state": "finished_ok", "progress": 1 - } - } + }} ) log.info("Publish finished.")