57 lines
1.6 KiB
Python
57 lines
1.6 KiB
Python
"""
|
|
Copyright (c) 2016 Keitaro AB
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
"""
|
|
|
|
import uuid
|
|
import os
|
|
|
|
DEBUG = False
|
|
TESTING = False
|
|
SECRET_KEY = str(uuid.uuid4())
|
|
USERNAME = str(uuid.uuid4())
|
|
PASSWORD = str(uuid.uuid4())
|
|
|
|
NAME = 'datapusher'
|
|
|
|
# database
|
|
|
|
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/job_store.db'
|
|
|
|
# webserver host and port
|
|
|
|
HOST = '0.0.0.0'
|
|
PORT = 8000
|
|
|
|
# logging
|
|
|
|
#FROM_EMAIL = 'server-error@example.com'
|
|
#ADMINS = ['yourname@example.com'] # where to send emails
|
|
|
|
#LOG_FILE = '/tmp/ckan_service.log'
|
|
STDERR = True
|
|
|
|
# Content length settings
|
|
MAX_CONTENT_LENGTH = int(os.environ.get('DATAPUSHER_MAX_CONTENT_LENGTH', '1024000'))
|
|
CHUNK_SIZE = int(os.environ.get('DATAPUSHER_CHUNK_SIZE', '16384'))
|
|
CHUNK_INSERT_ROWS = int(os.environ.get('DATAPUSHER_CHUNK_INSERT_ROWS', '250'))
|
|
DOWNLOAD_TIMEOUT = int(os.environ.get('DATAPUSHER_DOWNLOAD_TIMEOUT', '30'))
|
|
|
|
# Verify SSL
|
|
SSL_VERIFY = os.environ.get('DATAPUSHER_SSL_VERIFY', False)
|
|
|
|
# Rewrite resource URL's when ckan callback url base is used
|
|
REWRITE_RESOURCES = os.environ.get('DATAPUSHER_REWRITE_RESOURCES', False)
|
|
REWRITE_URL = os.environ.get('DATAPUSHER_REWRITE_URL', 'http://ckan:5000/')
|