mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #1262 from pypeclub/feature/remove_unused_envs
Remove unused deprecated environment variables
This commit is contained in:
commit
674844eeaf
2 changed files with 0 additions and 36 deletions
|
|
@ -57,25 +57,10 @@ def _prepare_publish_environments():
|
|||
project_name = os.getenv("AVALON_PROJECT")
|
||||
asset_name = os.getenv("AVALON_ASSET")
|
||||
|
||||
io.install()
|
||||
project_doc = io.find_one({
|
||||
"type": "project"
|
||||
})
|
||||
av_asset = io.find_one({
|
||||
"type": "asset",
|
||||
"name": asset_name
|
||||
})
|
||||
parents = av_asset["data"]["parents"]
|
||||
hierarchy = ""
|
||||
if parents:
|
||||
hierarchy = "/".join(parents)
|
||||
|
||||
env["AVALON_PROJECT"] = project_name
|
||||
env["AVALON_ASSET"] = asset_name
|
||||
env["AVALON_TASK"] = os.getenv("AVALON_TASK")
|
||||
env["AVALON_WORKDIR"] = os.getenv("AVALON_WORKDIR")
|
||||
env["AVALON_HIERARCHY"] = hierarchy
|
||||
env["AVALON_PROJECTCODE"] = project_doc["data"].get("code", "")
|
||||
env["AVALON_APP"] = f"hosts.{publish_host}"
|
||||
env["AVALON_APP_NAME"] = "celaction_local"
|
||||
|
||||
|
|
|
|||
|
|
@ -160,32 +160,11 @@ def set_context(project, asset, task):
|
|||
os.environ["AVALON_TASK"] = task
|
||||
io.Session["AVALON_TASK"] = task
|
||||
|
||||
io.install()
|
||||
|
||||
av_project = io.find_one({'type': 'project'})
|
||||
av_asset = io.find_one({
|
||||
"type": 'asset',
|
||||
"name": asset
|
||||
})
|
||||
|
||||
parents = av_asset['data']['parents']
|
||||
hierarchy = ''
|
||||
if parents and len(parents) > 0:
|
||||
hierarchy = os.path.sep.join(parents)
|
||||
|
||||
os.environ["AVALON_HIERARCHY"] = hierarchy
|
||||
io.Session["AVALON_HIERARCHY"] = hierarchy
|
||||
|
||||
os.environ["AVALON_PROJECTCODE"] = av_project['data'].get('code', '')
|
||||
io.Session["AVALON_PROJECTCODE"] = av_project['data'].get('code', '')
|
||||
|
||||
io.Session["current_dir"] = os.path.normpath(os.getcwd())
|
||||
|
||||
os.environ["AVALON_APP"] = HOST_NAME
|
||||
io.Session["AVALON_APP"] = HOST_NAME
|
||||
|
||||
io.uninstall()
|
||||
|
||||
|
||||
def cli_publish(data, publish_paths, gui=True):
|
||||
PUBLISH_SCRIPT_PATH = os.path.join(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue