def test_summary_class(self):
     """
     test make summary dict
     """
     file_list = self.input_module.get_file_data()
     class_word_vector = {}
     for file in file_list:
         self.input_module = InputFileCython(APP_ROOT + "/../../Data/wn_total_summary_51519_limit05_out_put/" + file.strip())
         self.input_module.input_special_format_file()
         if file.strip() not in class_word_vector:
             word_list = (list(map(lambda x:x.strip(), self.input_module.get_file_data())))
             class_word_vector.update({file.strip().replace("_summary.txt", ""): word_list})
     sqlite_twitter_cython = SqliteTwitterSummaryCython(class_word_vector)
     sqlite_twitter_cython.call_sql()
 def consumer_run(self):
     """
     Running Consumer
     """
     global class_queue
     while True:
         try:
             class_word_vector = class_queue.get()
         except class_queue.Empty:
             print("Queue Empty")
             pass
         else:
             log_text = "Consume "
             print(log_text)
             sqlite_twitter = SqliteTwitterSummaryCython(class_word_vector)
             sqlite_twitter.call_sql()
             class_queue.task_done()
             # Setting the wait time, I refered to the bellow link
             #  https://www.w3.org/Protocols/HTTP-NG/http-prob.html
             time.sleep(random.uniform(0.601, 0.602))
 def consumer_run(self):
     """
     Running Consumer
     """
     global class_queue
     while True:
         try:
             class_word_vector = class_queue.get()
         except class_queue.Empty:
             print("Queue Empty")
             pass
         else:
             log_text = "Consume "
             print(log_text)
             sqlite_twitter = SqliteTwitterSummaryCython(class_word_vector)
             sqlite_twitter.call_sql()
             class_queue.task_done()
             # Setting the wait time, I refered to the bellow link
             #  https://www.w3.org/Protocols/HTTP-NG/http-prob.html
             time.sleep(random.uniform(0.601, 0.602))