Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
 def test_reaction_init_kafka(self):
     init_kafka("localhost:9092")
     # Kafka is running properly on Travis-CI if this doesn't fail
     self.assertEqual(1, 1)
Ejemplo n.º 3
0
 def test_reaction_init_kafka(self):
     #TODO add test for remote client/w authentication
     init_kafka("localhost:9092")
     # Kafka is running properly on Travis-CI if this doesn't fail
     self.assertEqual(1, 1)