renamed 'check_ftrack_url' to 'resolve_ftrack_url'

This commit is contained in:
Jakub Trllo 2022-09-13 15:15:18 +02:00
parent aead601397
commit 0291d2a705
4 changed files with 11 additions and 11 deletions

View file

@ -2,12 +2,12 @@ from .ftrack_module import (
FtrackModule,
FTRACK_MODULE_DIR,
check_ftrack_url,
resolve_ftrack_url,
)
__all__ = (
"FtrackModule",
"FTRACK_MODULE_DIR",
"check_ftrack_url",
"resolve_ftrack_url",
)

View file

@ -65,7 +65,7 @@ class FtrackModule(
def get_ftrack_url(self):
if self._ftrack_url is _PLACEHOLDER:
self._ftrack_url = check_ftrack_url(
self._ftrack_url = resolve_ftrack_url(
self._settings_ftrack_url,
logger=self.log
)
@ -495,8 +495,8 @@ def _check_ftrack_url(url):
return True
def check_ftrack_url(url, log_errors=True, logger=None):
"""Checks if Ftrack server is responding"""
def resolve_ftrack_url(url, log_errors=True, logger=None):
"""Checks if Ftrack server is responding."""
if logger is None:
logger = Logger.get_logger(__name__)

View file

@ -22,7 +22,7 @@ from openpype.lib import (
)
from openpype_modules.ftrack import (
FTRACK_MODULE_DIR,
check_ftrack_url,
resolve_ftrack_url,
)
from openpype_modules.ftrack.lib import credentials
from openpype_modules.ftrack.ftrack_server import socket_thread
@ -116,7 +116,7 @@ def legacy_server(ftrack_url):
while True:
if not ftrack_accessible:
ftrack_accessible = check_ftrack_url(ftrack_url)
ftrack_accessible = resolve_ftrack_url(ftrack_url)
# Run threads only if Ftrack is accessible
if not ftrack_accessible and not printed_ftrack_error:
@ -259,7 +259,7 @@ def main_loop(ftrack_url):
while True:
# Check if accessible Ftrack and Mongo url
if not ftrack_accessible:
ftrack_accessible = check_ftrack_url(ftrack_url)
ftrack_accessible = resolve_ftrack_url(ftrack_url)
if not mongo_accessible:
mongo_accessible = check_mongo_url(mongo_uri)
@ -443,7 +443,7 @@ def run_event_server(
os.environ["CLOCKIFY_API_KEY"] = clockify_api_key
# Check url regex and accessibility
ftrack_url = check_ftrack_url(ftrack_url)
ftrack_url = resolve_ftrack_url(ftrack_url)
if not ftrack_url:
print('Exiting! < Please enter Ftrack server url >')
return 1

View file

@ -8,7 +8,7 @@ from Qt import QtCore, QtWidgets, QtGui
import ftrack_api
from openpype import resources
from openpype.lib import Logger
from openpype_modules.ftrack import check_ftrack_url, FTRACK_MODULE_DIR
from openpype_modules.ftrack import resolve_ftrack_url, FTRACK_MODULE_DIR
from openpype_modules.ftrack.ftrack_server import socket_thread
from openpype_modules.ftrack.lib import credentials
from . import login_dialog
@ -151,7 +151,7 @@ class FtrackTrayWrapper:
# Check if accessible Ftrack and Mongo url
if not ftrack_accessible:
ftrack_accessible = check_ftrack_url(ftrack_url)
ftrack_accessible = resolve_ftrack_url(ftrack_url)
# Run threads only if Ftrack is accessible
if not ftrack_accessible: