From d8e9a2a12b40a330226de9dbafe18e39aa78548a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Wed, 24 Apr 2019 11:02:23 +0900 Subject: [PATCH] Fix: edit package path --- src/web/python/chocomae/batch/unpaid_maestro_manager.py | 7 ------- src/web/python/chocomae/lib/database/db_manager.py | 6 ------ src/web/python/chocomae/lib/mail/mail_sender.py | 2 -- src/web/python/chocomae/remove_unpaid_maestro.py | 7 ++++++- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/web/python/chocomae/batch/unpaid_maestro_manager.py b/src/web/python/chocomae/batch/unpaid_maestro_manager.py index f509784..0177b3b 100644 --- a/src/web/python/chocomae/batch/unpaid_maestro_manager.py +++ b/src/web/python/chocomae/batch/unpaid_maestro_manager.py @@ -1,10 +1,3 @@ -import sys -import os -root = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/..') -# lib = os.path.join(root, 'lib') -sys.path.insert(0, root) -# print(sys.path) -from lib.database.db_manager import DBConnectParams from lib.database.db_manager import DBManager diff --git a/src/web/python/chocomae/lib/database/db_manager.py b/src/web/python/chocomae/lib/database/db_manager.py index 1d0f3bb..e31309e 100644 --- a/src/web/python/chocomae/lib/database/db_manager.py +++ b/src/web/python/chocomae/lib/database/db_manager.py @@ -1,9 +1,3 @@ -import sys -import os -root = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/..' + '/..') -sys.path.insert(0, root) - -import datetime import time import pymysql from lib.database.db_setting import DBSetting diff --git a/src/web/python/chocomae/lib/mail/mail_sender.py b/src/web/python/chocomae/lib/mail/mail_sender.py index 1f6b47e..ab010d1 100644 --- a/src/web/python/chocomae/lib/mail/mail_sender.py +++ b/src/web/python/chocomae/lib/mail/mail_sender.py @@ -1,8 +1,6 @@ import time from datetime import datetime import json -from typing import Dict, Any, Union - import requests import base64 import hmac diff --git a/src/web/python/chocomae/remove_unpaid_maestro.py b/src/web/python/chocomae/remove_unpaid_maestro.py index 987d0c0..5d59283 100644 --- a/src/web/python/chocomae/remove_unpaid_maestro.py +++ b/src/web/python/chocomae/remove_unpaid_maestro.py @@ -1,5 +1,10 @@ from batch.unpaid_maestro_manager import UnpaidMaestroManager +from lib.mail.mail_sender import MailSender umMan = UnpaidMaestroManager() maestro_list = umMan.get_unpaid_7days_maestro_list() -print(maestro_list) \ No newline at end of file +for item in maestro_list: + print(item) + +mailSender = MailSender() +mailSender.send_temp_mail() \ No newline at end of file