import logging
from datetime import datetime, timedelta

DEBUG=False

# LOGGING
LOGGER_NAME = "whyis_log"
LOG_FILENAME = "/var/log/whyis/output-whyis-%s.log" % (str(datetime.now()).replace(' ','_'))
LOG_LEVEL = logging.INFO
LOG_FORMAT = "%(asctime)s %(levelname)s\t: %(message)s" # used by logging.Formatter

PERMANENT_SESSION_LIFETIME = timedelta(days=7)
# EMAIL CONFIGURATION
## MAIL_SERVER = "smtp.mailgun.org"
## MAIL_PORT = 587
## MAIL_USE_TLS = True
## MAIL_USE_SSL = False
## MAIL_DEBUG = False
## MAIL_USERNAME = ''
## MAIL_PASSWORD = ''
## DEFAULT_MAIL_SENDER = "Whyis Admin <admin@whyis.example.com>"
EMBEDDED_FUSEKI = False
ADMIN_ENDPOINT = 'http://localhost:3030/admin/sparql'

KNOWLEDGE_ENDPOINT = 'http://localhost:3030/knowledge/sparql'

EMBEDDED_CELERY = False
CELERY_BROKER_URL = 'redis://localhost:6379/0'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'

NANOPUB_ARCHIVE = {
    'depot.storage_path' : "$WHYIS_APP_HOME/nanopublications",
}
FILE_ARCHIVE = {
    'cache_max_age' : 3600*24*7,
    'depot.storage_path' : '$WHYIS_APP_HOME/files'
}
CACHE_TYPE = "redis" # Flask-Caching related configs
CACHE_KEY_PREFIX = 'whyis_cache_'
CACHE_REDIS_URL = 'redis://localhost:6379/0'
CACHE_DEFAULT_TIMEOUT = 0
MULTIUSER = True
