def __init__(self, tray_widget, main_window): self.tray_widget = tray_widget self.main_window = main_window self.pype_info_widget = None self.log = Logger.get_logger(self.__class__.__name__) self.module_settings = get_system_settings()["modules"] self.modules_manager = TrayModulesManager() self.errors = []
def publish(paths): """Start headless publishing. Publish use json from passed paths argument. Args: paths (list): Paths to jsons. Raises: RuntimeError: When there is no pathto process. """ if not any(paths): raise RuntimeError("No publish paths specified") from openpype import install, uninstall from openpype.api import Logger # Register target and host import pyblish.api import pyblish.util env = get_app_environments_for_context(os.environ["AVALON_PROJECT"], os.environ["AVALON_ASSET"], os.environ["AVALON_TASK"], os.environ["AVALON_APP_NAME"]) os.environ.update(env) log = Logger.get_logger() install() pyblish.api.register_target("filesequence") pyblish.api.register_host("shell") os.environ["OPENPYPE_PUBLISH_DATA"] = os.pathsep.join(paths) log.info("Running publish ...") # Error exit as soon as any error occurs. error_format = "Failed {plugin.__name__}: {error} -- {error.traceback}" for result in pyblish.util.publish_iter(): if result["error"]: log.error(error_format.format(**result)) uninstall() sys.exit(1) log.info("Publish finished.") uninstall()
import sys import datetime import signal import socket import pymongo import ftrack_api from openpype.modules.ftrack.ftrack_server.ftrack_server import FtrackServer from openpype.modules.ftrack.ftrack_server.lib import ( SocketSession, StorerEventHub, TOPIC_STATUS_SERVER, TOPIC_STATUS_SERVER_RESULT) from openpype.modules.ftrack.lib import get_ftrack_event_mongo_info from openpype.lib import OpenPypeMongoConnection from openpype.api import Logger log = Logger.get_logger("Event storer") subprocess_started = datetime.datetime.now() class SessionFactory: session = None database_name, collection_name = get_ftrack_event_mongo_info() dbcon = None # ignore_topics = ["ftrack.meta.connected"] ignore_topics = [] def install_db():