This commit is contained in:
2024-07-10 16:46:28 +08:00
parent 70d3974058
commit 5c3526319f
4 changed files with 15 additions and 23 deletions
+6 -2
View File
@@ -164,6 +164,9 @@ class MessageUploader:
shutil.copy2(source_path, destination_path)
return file_path.replace(file_name, new_file_name)
def logger_test(self):
self.logger.info('this is a test')
def upload_didi_saved_message_to_db():
msg_list = []
@@ -198,11 +201,12 @@ if __name__ == "__main__":
config['database'] = "TestDB"
tg = MessageUploader(config_path=config_path,
local_logger=LoggerClass().get_log(logging.DEBUG),
local_load_path='E:\\SNSFiles\\ChatExport_2023-12-27',
local_load_path='E:\\SNSFiles\\ChatExport_2024-07-10',
local_file_db_path=config['file_db_path'],
size_limit=0.25)
try:
tg.do_upload()
# tg.do_upload()
tg.logger_test()
finally:
tg.db_handler.close()
print('done')
-13
View File
@@ -1,13 +0,0 @@
import os
import time
import datetime
import json
from src.My_Logger.project_logger import LoggerClass
from src.PostgresSQL.databaseHandler import DatabaseHandler
if __name__ == "__main__":
print('done')