def __init__(self, useKafka, useES, useSQL, outputJSON): self.producer = None self.es = None if useKafka: self.producer = init_kafka(os.environ['KAFKA_PORT']) if useES: self.es = init_es() self.ES = useES self.useSQL = useSQL self.JSON = outputJSON self.file_id = "" self.access_token = "" self.tstamp = "" self.sesh = strftime("%Y-%m-%d-%H", gmtime()) self.dir = "data/files/" + self.sesh + "/" if not os.path.exists(self.dir): os.makedirs(self.dir)
def test_run_es(self): init_es() # TODO IMPLEMENT object comparision test self.assertEqual(1, 1)