Oliver James

11 papers Journal 5Unranked 6
YearRankTypeTitle / Venue / Authors
2025 J jnl
NeuroImage
Jisub Bae, Koeun Jung, Oliver James, Satoru Suzuki, Yee Joon Kim
2023 J jnl
Gov. Inf. Q.
László Horváth, Oliver James, Susan Banducci, Ana Beduschi
2021 conf
SIGGRAPH Talks
Oliver James, Rémi Achard, James Bird, Sean Cooper
2016 conf
DigiPro
Alastair Barber, Darren Cosker, Oliver James, Ted Waine, Radhika Patel
2016 J jnl
Wirel. Pers. Commun.
Oliver James
2015 conf
SIGGRAPH Talks
Oliver James, Sylvan Dieckmann, Simon Pabst, Paul-George H. Roberts, Kip S. Thorne
2014 J jnl
CoRR
Oliver James, Heung-No Lee
2014 J jnl
CoRR
Oliver James, Heung-No Lee
2013 conf
GlobalSIP
Oliver James, Woong-Bi Lee, Heung-No Lee
2009 conf
SIGGRAPH Talks
Ted Waine, Oliver James
2004 conf
SIGGRAPH Sketches
George Burshukov, Kody Sabourin, Masuo Suzuki, Oystein Larsen, Tadao Mihashi, Ken Faiman, Scot Schinderman, Oliver James, John Jack
redb/settings/elasticsearch.py
← Index redb/settings/elasticsearch.py python
import logging
import os

from elasticsearch import Elasticsearch
from dotenv import load_dotenv

load_dotenv()

# Elasticsearch configuration
ELASTIC_ENDPOINT = os.getenv("ELASTIC_HOST")
ELASTIC_ENFORCE_SSL = os.getenv("ELASTIC_ENFORCE_SSL", False) == "True"
ELASTIC_USER = os.getenv("ELASTIC_USER")
ELASTIC_PASSWORD = os.getenv("ELASTIC_PASSWORD")
ELASTIC_BINARIES_COLLECTION = os.getenv("ELASTIC_BINARIES_COLLECTION", "test_db")

# Cached client instance
_elasticsearch_client = None

def get_elasticsearch_client():
    """Get Elasticsearch client with lazy initialization and caching"""
    global _elasticsearch_client
    
    if _elasticsearch_client is None:
        if not ELASTIC_ENDPOINT:
            raise ValueError("ELASTIC_HOST environment variable is required for Elasticsearch connection")
            
        _elasticsearch_client = Elasticsearch(
            ELASTIC_ENDPOINT,
            verify_certs=ELASTIC_ENFORCE_SSL,
            basic_auth=(ELASTIC_USER, ELASTIC_PASSWORD),
            maxsize=20,
            retry_on_timeout=True,
            timeout=30,
        )
    
    return _elasticsearch_client

def create_elasticsearch_client():
    """Create a new Elasticsearch client connection (legacy function)"""
    return get_elasticsearch_client()