mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merged in feature/PYPE-349_parallel_event_server (pull request #343)
Feature/PYPE-349 parallel event server
This commit is contained in:
commit
92ca7d9041
3 changed files with 9 additions and 9 deletions
|
|
@ -126,7 +126,7 @@ def process_event_paths(event_paths):
|
|||
return os.pathsep.join(return_paths), not_found
|
||||
|
||||
|
||||
def old_way_server(ftrack_url):
|
||||
def legacy_server(ftrack_url):
|
||||
# Current file
|
||||
file_path = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ def old_way_server(ftrack_url):
|
|||
wait_time_after_max_fail = 10
|
||||
|
||||
subproc = None
|
||||
subproc_path = "{}/sub_old_way.py".format(file_path)
|
||||
subproc_path = "{}/sub_legacy_server.py".format(file_path)
|
||||
subproc_last_failed = datetime.datetime.now()
|
||||
subproc_failed_count = 0
|
||||
|
||||
|
|
@ -459,7 +459,7 @@ def main(argv):
|
|||
action="store_true"
|
||||
)
|
||||
parser.add_argument(
|
||||
'-oldway',
|
||||
'-legacy',
|
||||
help="Load creadentials from apps dir",
|
||||
action="store_true"
|
||||
)
|
||||
|
|
@ -487,7 +487,7 @@ def main(argv):
|
|||
if kwargs.ftrackapikey:
|
||||
api_key = kwargs.ftrackapikey
|
||||
|
||||
oldway = kwargs.oldway
|
||||
legacy = kwargs.legacy
|
||||
# Check url regex and accessibility
|
||||
ftrack_url = check_ftrack_url(ftrack_url)
|
||||
if not ftrack_url:
|
||||
|
|
@ -519,8 +519,8 @@ def main(argv):
|
|||
os.environ["FTRACK_API_KEY"] = api_key
|
||||
os.environ["FTRACK_EVENTS_PATH"] = event_paths
|
||||
|
||||
if oldway:
|
||||
return old_way_server(ftrack_url)
|
||||
if legacy:
|
||||
return legacy_server(ftrack_url)
|
||||
|
||||
return main_loop(ftrack_url)
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class ProcessEventHub(ftrack_api.event.hub.EventHub):
|
|||
def prepare_dbcon(self):
|
||||
try:
|
||||
self.dbcon.install()
|
||||
dbcon._database.collection_names()
|
||||
self.dbcon._database.collection_names()
|
||||
except pymongo.errors.AutoReconnect:
|
||||
log.error("Mongo server \"{}\" is not responding, exiting.".format(
|
||||
os.environ["AVALON_MONGO"]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from pype.vendor import ftrack_api
|
|||
from pype.vendor.ftrack_api.event.hub import EventHub
|
||||
from pypeapp import Logger
|
||||
|
||||
log = Logger().get_logger("Event Server Old")
|
||||
log = Logger().get_logger("Event Server Legacy")
|
||||
|
||||
|
||||
class TimerChecker(threading.Thread):
|
||||
|
|
@ -67,7 +67,7 @@ def main(args):
|
|||
check_thread = TimerChecker(server, session)
|
||||
check_thread.start()
|
||||
|
||||
log.debug("Launching Ftrack Event Old Way Server")
|
||||
log.debug("Launching Ftrack Event Legacy Server")
|
||||
server.run_server(session)
|
||||
|
||||
except Exception as exc:
|
||||
Loading…
Add table
Add a link
Reference in a new issue