def setup_globals(): global es, sched, logger # set the logging level according to the config logging.basicConfig(level=app.config["LOGGING_LEVEL"], format=("%(asctime)s %(name)s [%(threadName)s]: " "%(message)s")) # silence the given libraries, since they go crazy in debug-mode. for lib in "requests urllib3 elasticsearch".split(): logging.getLogger(lib).setLevel(logging.WARNING) logger = logging.getLogger(__name__) # connect to the elasticDB es = elastic.Elastic(app.config["ELASTICSEARCH_HOST"], app.config["ELASTICSEARCH_PORT"], (app.config["ELASTICSEARCH_USER"], app.config["ELASTICSEARCH_PASSWORD"]), cert=app.config["ELASTICSEARCH_CAFILE"], docs_index=app.config["ELASTICSEARCH_DOCS_INDEX"], fs_dir=app.config["UPLOAD_DIR"]) # start the scheduler sched = scheduler.Scheduler(es.es, crawler_args={"elastic": es}, hour=2, minute=0)
def __init__(self, config, result_dir_ts): self.logger = logging.getLogger('browbeat.shaker') self.overcloudrc = get_overcloudrc() self.config = config self.result_dir_ts = result_dir_ts self.tools = tools.Tools(self.config) self.grafana = grafana.Grafana(self.config) self.elastic = elastic.Elastic(self.config, self.__class__.__name__.lower())
def __init__(self, config, hosts=None): self.logger = logging.getLogger('browbeat.rally') self.config = config self.tools = tools.Tools(self.config) self.grafana = grafana.Grafana(self.config) self.elastic = elastic.Elastic(self.config, self.__class__.__name__.lower()) self.error_count = 0 self.pass_count = 0 self.test_count = 0 self.scenario_count = 0
def __init__(self, config, result_dir_ts): self.logger = logging.getLogger('browbeat.yoda') self.config = config self.result_dir_ts = result_dir_ts self.tools = tools.Tools(self.config) self.grafana = grafana.Grafana(self.config) self.elastic = elastic.Elastic(self.config, self.__class__.__name__.lower()) self.error_count = 0 self.pass_count = 0 self.test_count = 0 self.scenario_count = 0
def __init__(self, config): self.logger = logging.getLogger('browbeat.shaker') self.overcloudrc = get_overcloudrc() self.config = config self.tools = tools.Tools(self.config) self.grafana = grafana.Grafana(self.config) self.elastic = elastic.Elastic(self.config, self.__class__.__name__.lower()) self.error_count = 0 self.pass_count = 0 self.test_count = 0 self.scenario_count = 0
def create_in(self): if self.setting['minimize'] == True or self.setting[ 'minimize'] == False: if self.setting['minimize'] == True: self.fix = self.fix_min else: self.fix = self.fix_nve mass = self.system.getMasess() in_lammps = self.in_frame % (self.data_lmps, self.Interaction, mass, self.fix) with open(self.in_lmp, 'w') as inscript: inscript.write(in_lammps) else: elast = elastic.Elastic(self.setting) elast.write_scripts(self.Interaction)