import intensity.conf as intensity_conf DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '*****@*****.**'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME = os.path.join(intensity_conf.get_home_dir(), 'sqlite.db') # Or path to database file if using sqlite3. DATABASE_USER = '' # Not used with sqlite3. DATABASE_PASSWORD = '' # Not used with sqlite3. DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. DATABASE_OPTIONS = { 'timeout': 15 } # Wait more than the default 5 seconds for 'database is locked' errors # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. # If running in a Windows environment this must be set to the same as your # system time zone. TIME_ZONE = 'America/Chicago' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html
def get_account_error_log_dir(account): uuid = account.uuid _dir = os.path.join(intensity_conf.get_home_dir(), 'error_logs', uuid) if not os.path.exists(_dir): os.makedirs(_dir) return _dir
'/static': static_app, '/favicon.ico': static_app, '/robots.txt': static_app, }) server = wsgiserver.CherryPyWSGIServer( ('0.0.0.0', int(intensity_conf.get('Network', 'port'))), dispatcher, server_name = intensity_conf.get('Network', 'address', 'localhost'), numthreads = int(intensity_conf.get('Network', 'num_threads')), request_queue_size = int(intensity_conf.get('Network', 'request_queue_size')), timeout = int(intensity_conf.get('Network', 'timeout', 10)), ) if auth: server.ssl_certificate = os.path.join(intensity_conf.get_home_dir(), 'ssl', 'cert.crt') server.ssl_private_key = os.path.join(intensity_conf.get_home_dir(), 'ssl', 'cert.key') ## CherryPy trunk ## import ssl_builtin ## server.ssl_adapter = ssl_builtin.BuiltinSSLAdapter( # import ssl_pyopenssl # server.ssl_adapter = ssl_pyopenssl.pyOpenSSLAdapter( # os.path.join(intensity_conf.get_home_dir(), 'ssl', 'cert.crt'), # os.path.join(intensity_conf.get_home_dir(), 'ssl', 'cert.key'), # ) try: print " Starting server..." server.start() except KeyboardInterrupt:
'/favicon.ico': static_app, '/robots.txt': static_app, }) server = wsgiserver.CherryPyWSGIServer( ('0.0.0.0', int(intensity_conf.get('Network', 'port'))), dispatcher, server_name=intensity_conf.get('Network', 'address', 'localhost'), numthreads=int(intensity_conf.get('Network', 'num_threads')), request_queue_size=int( intensity_conf.get('Network', 'request_queue_size')), timeout=int(intensity_conf.get('Network', 'timeout', 10)), ) if auth: server.ssl_certificate = os.path.join(intensity_conf.get_home_dir(), 'ssl', 'cert.crt') server.ssl_private_key = os.path.join(intensity_conf.get_home_dir(), 'ssl', 'cert.key') ## CherryPy trunk ## import ssl_builtin ## server.ssl_adapter = ssl_builtin.BuiltinSSLAdapter( # import ssl_pyopenssl # server.ssl_adapter = ssl_pyopenssl.pyOpenSSLAdapter( # os.path.join(intensity_conf.get_home_dir(), 'ssl', 'cert.crt'), # os.path.join(intensity_conf.get_home_dir(), 'ssl', 'cert.key'), # ) try: print " Starting server..."