Skip to content

collect_farm_env_variables

CollectKitsuJobEnvVars

Bases: ContextPlugin

Collect set of environment variables to submit with deadline jobs

Source code in client/ayon_kitsu/plugins/publish/collect_farm_env_variables.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class CollectKitsuJobEnvVars(pyblish.api.ContextPlugin):
    """Collect set of environment variables to submit with deadline jobs"""
    order = pyblish.api.CollectorOrder - 0.45
    label = "Collect Kitsu farm environment variables"
    targets = ["local"]

    def process(self, context):
        env = context.data.setdefault(FARM_JOB_ENV_DATA_KEY, {})
        for key in [
            "KITSU_SERVER",
            "KITSU_LOGIN",
            "KITSU_PWD",
        ]:
            value = os.getenv(key)
            if value:
                self.log.debug(f"Setting job env: {key}: {value}")
                env[key] = value