Nelly Schuster

13 papers A 2C 2Journal 1Unranked 7
YearRankTypeTitle / Venue / Authors
2013
Nelly Schuster
2012 conf
SOCA
Ulrich Scholten, Nelly Schuster, Stefan Tai
2012 A conf
ICSOC
Erik Wittern, Nelly Schuster, Jörn Kuhlenkamp, Stefan Tai
2011 conf
SOCA
Nelly Schuster, Christian Zirpins, Ulrich Scholten
2010 conf
ICWE Workshops
Nelly Schuster, Christian Zirpins, Stefan Tai
2010 conf
CAiSE Forum (Selected Papers)
Nelly Schuster, Raffael Stein, Christian Zirpins
2010 conf
CAiSE Forum
Nelly Schuster, Raffael Stein, Christian Zirpins
2010 A conf
ICSOC
Nelly Schuster, Raffael Stein, Christian Zirpins, Stefan Tai
2010 conf
Mashups
Nelly Schuster, Christian Zirpins, Mathis Schwuchow, Steve Battle, Stefan Tai
2009 C conf
WETICE
Nelly Schuster, Christian Zirpins, Stefan Tai, Steve Battle, Nils Heuer
2009 J jnl
J. Syst. Softw.
Olaf Zimmermann, Jana Koehler, Frank Leymann, Ronny Polley, Nelly Schuster
2007 C conf
SEKE
Nelly Schuster, Olaf Zimmermann, Cesare Pautasso
2007 conf
QoSA
Olaf Zimmermann, Thomas Gschwind, Jochen Malte Küster, Frank Leymann, Nelly Schuster
redb/utils/push_to_elastic.py
← Index redb/utils/push_to_elastic.py python
import json
import os
#from redb.settings import elasticsearch as es
from elasticsearch import Elasticsearch
from dataclasses import asdict
from dotenv import load_dotenv

class Utils():
    """
    Utility class for pushing

    """
    @staticmethod
    def push_to_elastic(sample_dict):
        """
        Pushes the sample_dict to elastic search
        """
        load_dotenv()
        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", "redb_test"
        )
        es = Elasticsearch(
            ELASTIC_ENDPOINT,
            verify_certs=ELASTIC_ENFORCE_SSL,
            basic_auth=(ELASTIC_USER, ELASTIC_PASSWORD),
            maxsize=20,
            retry_on_timeout=True,
            timeout=30,
        )

        try:
            dict_dump = json.dumps(sample_dict)
        except Exception as e:
            print(f"Error: {e}")
            return False
        elastic = es.index(index=ELASTIC_BINARIES_COLLECTION, body=dict_dump)
        return True
    
    def push_to_index(sample_dict, index_name):
        """
        Pushes the sample_dict to elastic search
        """
        load_dotenv()
        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 = index_name
        
        es = Elasticsearch(
            ELASTIC_ENDPOINT,
            verify_certs=ELASTIC_ENFORCE_SSL,
            basic_auth=(ELASTIC_USER, ELASTIC_PASSWORD),
            maxsize=20,
            retry_on_timeout=True,
            timeout=30,
        )

        try:
            dict_dump = json.dumps(sample_dict)
        except Exception as e:
            print(f"Error: {e}")
            return False
        elastic = es.index(index=ELASTIC_BINARIES_COLLECTION, body=dict_dump)
        return True