Exemple #1
0
port = 587
ssl_certfile =
ssl_keyfile =
use_ssl = False
use_tls = True
file_path =
default_from_email = [email protected]
subject_prefix = [Archivematica]
timeout = 300
#server_email =
"""

config = Config(env_prefix="ARCHIVEMATICA_MCPSERVER", attrs=CONFIG_MAPPING)
config.read_defaults(StringIO.StringIO(CONFIG_DEFAULTS))
config.read_files([
    "/etc/archivematica/archivematicaCommon/dbsettings",
    "/etc/archivematica/MCPServer/serverConfig.conf",
])

DATABASES = {
    "default": {
        "ENGINE": config.get("db_engine"),
        "NAME": config.get("db_name"),
        "USER": config.get("db_user"),
        "PASSWORD": config.get("db_password"),
        "HOST": config.get("db_host"),
        "PORT": config.get("db_port"),
        # CONN_MAX_AGE is irrelevant in MCPServer because Django's database
        # connection reciclyng mechanism is only used in the web context, i.e.
        # see `signals.request_started` and `signals.request_finished` in
        # Django's source code.
        "CONN_MAX_AGE": 0,
Exemple #2
0
port = 587
ssl_certfile =
ssl_keyfile =
use_ssl = False
use_tls = True
file_path =
default_from_email = [email protected]
subject_prefix = [Archivematica]
timeout = 300
#server_email =
"""

config = Config(env_prefix="ARCHIVEMATICA_MCPCLIENT", attrs=CONFIG_MAPPING)
config.read_defaults(StringIO.StringIO(CONFIG_DEFAULTS))
config.read_files([
    "/etc/archivematica/archivematicaCommon/dbsettings",
    "/etc/archivematica/MCPClient/clientConfig.conf",
])

DATABASES = {
    "default": {
        "ENGINE": config.get("db_engine"),
        "NAME": config.get("db_name"),
        "USER": config.get("db_user"),
        "PASSWORD": config.get("db_password"),
        "HOST": config.get("db_host"),
        "PORT": config.get("db_port"),
        # Recycling connections in MCPClient is not an option because this is
        # a threaded application. We need a connection pool but we don't have
        # one we can rely on at the moment - django_mysqlpool does not support
        # Py3 and seems abandoned.
        "CONN_MAX_AGE": 0,
Exemple #3
0
port = 587
ssl_certfile =
ssl_keyfile =
use_ssl = False
use_tls = True
file_path =
default_from_email = [email protected]
subject_prefix = [Archivematica]
timeout = 300
#server_email =
"""

config = Config(env_prefix='ARCHIVEMATICA_MCPCLIENT', attrs=CONFIG_MAPPING)
config.read_defaults(StringIO.StringIO(CONFIG_DEFAULTS))
config.read_files([
    '/etc/archivematica/archivematicaCommon/dbsettings',
    '/etc/archivematica/MCPClient/clientConfig.conf',
])


DATABASES = {
    'default': {
        'ENGINE': config.get('db_engine'),
        'NAME': config.get('db_name'),
        'USER': config.get('db_user'),
        'PASSWORD': config.get('db_password'),
        'HOST': config.get('db_host'),
        'PORT': config.get('db_port'),

        # Recycling connections in MCPClient is not an option because this is
        # a threaded application. We need a connection pool but we don't have
        # one we can rely on at the moment - django_mysqlpool does not support
Exemple #4
0
port = 587
ssl_certfile =
ssl_keyfile =
use_ssl = False
use_tls = True
file_path =
default_from_email = [email protected]
subject_prefix = [Archivematica]
timeout = 300
#server_email =
"""

config = Config(env_prefix='ARCHIVEMATICA_MCPSERVER', attrs=CONFIG_MAPPING)
config.read_defaults(StringIO.StringIO(CONFIG_DEFAULTS))
config.read_files([
    '/etc/archivematica/archivematicaCommon/dbsettings',
    '/etc/archivematica/MCPServer/serverConfig.conf',
])

DATABASES = {
    'default': {
        'ENGINE': config.get('db_engine'),
        'NAME': config.get('db_name'),
        'USER': config.get('db_user'),
        'PASSWORD': config.get('db_password'),
        'HOST': config.get('db_host'),
        'PORT': config.get('db_port'),

        # CONN_MAX_AGE is irrelevant in MCPServer because Django's database
        # connection reciclyng mechanism is only used in the web context, i.e.
        # see `signals.request_started` and `signals.request_finished` in
        # Django's source code.
Exemple #5
0
agentarchives_client_timeout = 300

[client]
user = archivematica
password = demo
host = localhost
database = MCP
port = 3306
engine = django.db.backends.mysql
conn_max_age = 0
"""

config = Config(env_prefix='ARCHIVEMATICA_DASHBOARD', attrs=CONFIG_MAPPING)
config.read_defaults(StringIO.StringIO(CONFIG_DEFAULTS))
config.read_files([
    '/etc/archivematica/archivematicaCommon/dbsettings',
])

path_of_this_file = os.path.abspath(os.path.dirname(__file__))

BASE_PATH = os.path.abspath(os.path.join(path_of_this_file, os.pardir))

# Django settings for app project.

DEBUG = False

ADMINS = (
    # ('Your Name', '*****@*****.**'),
)

MANAGERS = ADMINS
Exemple #6
0
            }
        )

    if not config.get("db_name"):
        config_dict["a3m"].update({"db_name": data_dir / "db.sqlite"})

    # Create home directory if we're going to use it.
    if config_dict["a3m"]:
        data_dir.mkdir(parents=True, exist_ok=True)

    return config_dict


config = Config(env_prefix="A3M", attrs=CONFIG_MAPPING)
config.read_defaults(StringIO(CONFIG_DEFAULTS))
config.read_files(["/etc/a3m/a3m.cfg"])
config.read_dict(_get_data_dir_defaults(config))


# Django

DATABASES = {
    "default": {
        "ENGINE": config.get("db_engine"),
        "NAME": config.get("db_name"),
        "USER": config.get("db_user"),
        "PASSWORD": config.get("db_password"),
        "HOST": config.get("db_host"),
        "PORT": config.get("db_port"),
        "CONN_MAX_AGE": 3600,
        "OPTIONS": {"timeout": 5},