From c424872f89249f592e2333613610dcd94a712974 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 9 Nov 2021 18:34:29 +0100 Subject: [PATCH] remove IntegrateContextToLog which does twhat is already done --- .../publish/integrate_context_to_log.py | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 openpype/hosts/webpublisher/plugins/publish/integrate_context_to_log.py diff --git a/openpype/hosts/webpublisher/plugins/publish/integrate_context_to_log.py b/openpype/hosts/webpublisher/plugins/publish/integrate_context_to_log.py deleted file mode 100644 index 261b7e9e0d..0000000000 --- a/openpype/hosts/webpublisher/plugins/publish/integrate_context_to_log.py +++ /dev/null @@ -1,38 +0,0 @@ -import os - -import pyblish.api -from openpype.lib import OpenPypeMongoConnection - - -class IntegrateContextToLog(pyblish.api.ContextPlugin): - """ Adds context information to log document for displaying in front end""" - - label = "Integrate Context to Log" - order = pyblish.api.IntegratorOrder - 0.1 - hosts = ["webpublisher"] - - def process(self, context): - self.log.info("Integrate Context to Log") - - mongo_client = OpenPypeMongoConnection.get_mongo_client() - database_name = os.environ["OPENPYPE_DATABASE_NAME"] - dbcon = mongo_client[database_name]["webpublishes"] - - for instance in context: - self.log.info("ctx_path: {}".format(instance.data.get("ctx_path"))) - self.log.info("batch_id: {}".format(instance.data.get("batch_id"))) - if instance.data.get("ctx_path") and instance.data.get("batch_id"): - self.log.info("Updating log record") - dbcon.update_one( - { - "batch_id": instance.data.get("batch_id"), - "status": "in_progress" - }, - { - "$set": { - "path": instance.data.get("ctx_path") - } - } - ) - - return