mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Rebrand database access
All occurences of 'pype' database should be replaced with 'openpype'
This commit is contained in:
parent
5887efeefc
commit
73841259bf
9 changed files with 24 additions and 25 deletions
|
|
@ -24,7 +24,7 @@ from .mongo import (
|
|||
compose_url,
|
||||
get_default_components,
|
||||
validate_mongo_connection,
|
||||
PypeMongoConnection
|
||||
OpenPypeMongoConnection
|
||||
)
|
||||
from .anatomy import (
|
||||
merge_dict,
|
||||
|
|
@ -213,7 +213,7 @@ __all__ = [
|
|||
"compose_url",
|
||||
"get_default_components",
|
||||
"validate_mongo_connection",
|
||||
"PypeMongoConnection",
|
||||
"OpenPypeMongoConnection",
|
||||
|
||||
"IniSettingRegistry",
|
||||
"JSONSettingRegistry",
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ from . import Terminal
|
|||
from .mongo import (
|
||||
MongoEnvNotSet,
|
||||
decompose_url,
|
||||
PypeMongoConnection
|
||||
OpenPypeMongoConnection
|
||||
)
|
||||
try:
|
||||
import log4mongo
|
||||
|
|
@ -203,7 +203,7 @@ class PypeLogger:
|
|||
log_mongo_url_components = None
|
||||
|
||||
# Database name in Mongo
|
||||
log_database_name = "pype"
|
||||
log_database_name = os.environ["OPENPYPE_DATABASE_NAME"]
|
||||
# Collection name under database in Mongo
|
||||
log_collection_name = "logs"
|
||||
|
||||
|
|
@ -470,7 +470,7 @@ class PypeLogger:
|
|||
if not cls.initialized:
|
||||
cls.initialize()
|
||||
|
||||
return PypeMongoConnection.get_mongo_client(cls.log_mongo_url)
|
||||
return OpenPypeMongoConnection.get_mongo_client(cls.log_mongo_url)
|
||||
|
||||
|
||||
def timeit(method):
|
||||
|
|
|
|||
|
|
@ -129,13 +129,13 @@ def validate_mongo_connection(mongo_uri):
|
|||
client.close()
|
||||
|
||||
|
||||
class PypeMongoConnection:
|
||||
class OpenPypeMongoConnection:
|
||||
"""Singleton MongoDB connection.
|
||||
|
||||
Keeps MongoDB connections by url.
|
||||
"""
|
||||
mongo_clients = {}
|
||||
log = logging.getLogger("PypeMongoConnection")
|
||||
log = logging.getLogger("OpenPypeMongoConnection")
|
||||
|
||||
@staticmethod
|
||||
def get_default_mongo_url():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue