Ole W. Christensen

21 papers C 1Journal 19
YearRankTypeTitle / Venue / Authors
2021 J jnl
Adv. Comput. Math.
Ole W. Christensen, Say Song Goh, Hong Oh Kim, Rae Young Kim
2018 J jnl
Adv. Comput. Math.
Ole W. Christensen, Augustus J. E. M. Janssen, Hong Oh Kim, Rae Young Kim
2017 J jnl
Frontiers Appl. Math. Stat.
Ole W. Christensen, Say Song Goh
2017 J jnl
Adv. Comput. Math.
Ole W. Christensen, Marzieh Hasannasab, Jakob Lemvig
2017 J jnl
Appl. Math. Comput.
Peter Massopust, Brigitte Forster, Ole W. Christensen
2016 J jnl
Adv. Comput. Math.
Ole W. Christensen, Hong Oh Kim, Rae Young Kim
2015 J jnl
J. Approx. Theory
Ole W. Christensen, Say Song Goh
2015 ch.
Handbook of Mathematical Methods in Imaging
Ole W. Christensen, Hans G. Feichtinger, Stephan Paukner
2013 J jnl
J. Approx. Theory
Ole W. Christensen, Elnaz Osgooei
2012 J jnl
Adv. Comput. Math.
Ole W. Christensen, Peter Massopust
2012 J jnl
Adv. Comput. Math.
Ole W. Christensen, Hong Oh Kim, Rae Young Kim
2010 J jnl
Adv. Comput. Math.
Ole W. Christensen, Say Song Goh
2008 J jnl
J. Approx. Theory
Ole W. Christensen, Wenchang Sun
2008 J jnl
Adv. Comput. Math.
Ole W. Christensen, Asghar Rahimi
2007 J jnl
J. Approx. Theory
Marcin Bownik, Ole W. Christensen
2006 J jnl
EURASIP J. Adv. Signal Process.
Yonina C. Eldar, Ole W. Christensen
2006 J jnl
Am. Math. Mon.
Ole W. Christensen, Khadija L. Christensen
2005 J jnl
J. Approx. Theory
Ole W. Christensen, Thomas Strohmer
2003 J jnl
Adv. Comput. Math.
Peter G. Casazza, Ole W. Christensen
1997 J jnl
J. Electronic Imaging
Peter G. Casazza, Ole W. Christensen
1993 C conf
VCIP
Hans Georg Feichtinger, Ole W. Christensen
redb/settings/clickhouse.py
← Index redb/settings/clickhouse.py python
import os
import clickhouse_connect
from dotenv import load_dotenv

load_dotenv()

# ClickHouse configuration
CLICKHOUSE_HOST = os.getenv("CLICKHOUSE_HOST")
CLICKHOUSE_PORT = os.getenv("CLICKHOUSE_PORT", "9000")
CLICKHOUSE_USER = os.getenv("CLICKHOUSE_USER")
CLICKHOUSE_PASSWORD = os.getenv("CLICKHOUSE_PASSWORD")
CLICKHOUSE_DATABASE = os.getenv("CLICKHOUSE_DATABASE", "default")
CLICKHOUSE_ENFORCE_SSL = os.getenv("CLICKHOUSE_ENFORCE_SSL", "False")

# Cached client instance
_clickhouse_client = None

def get_clickhouse_client():
    """Get ClickHouse client with lazy initialization and caching"""
    global _clickhouse_client
    
    if _clickhouse_client is None:
        _clickhouse_client = clickhouse_connect.get_client(
            host=CLICKHOUSE_HOST,
            port=CLICKHOUSE_PORT,
            user=CLICKHOUSE_USER,
            password=CLICKHOUSE_PASSWORD,
            database=CLICKHOUSE_DATABASE,
            verify=CLICKHOUSE_ENFORCE_SSL,
            settings={
                'max_execution_time': 3600,  # 1 hour timeout
                'connect_timeout': 30,
                'receive_timeout': 30,
                'send_timeout': 30
            }
        )
    
    return _clickhouse_client

def create_clickhouse_client():
    """Create a new ClickHouse client connection (legacy function)"""
    return get_clickhouse_client()

CLICKHOUSE_BINARIES_TABLE = os.getenv("CLICKHOUSE_BINARIES_TABLE", "binaries")