OP-1920 - override get_local_site_id from env var

This commit is contained in:
Petr Kalis 2021-10-25 16:48:04 +02:00
parent 19b5d47b24
commit 421ac7716e

View file

@ -522,6 +522,11 @@ def get_local_site_id():
Identifier is created if does not exists yet.
"""
# override local id from environment
# used for background syncing
if os.environ.get("SITE_SYNC_LOCAL_ID"):
return os.environ["SITE_SYNC_LOCAL_ID"]
registry = OpenPypeSettingsRegistry()
try:
return registry.get_item("localId")