This commit is contained in:
dsyoon
2023-02-12 00:28:13 +09:00
parent 4010d1cc78
commit 426ca43ff7
5 changed files with 81 additions and 22 deletions

View File

@@ -575,7 +575,7 @@ class StockStatus (HTS):
dir_name = os.path.join(outPath, "99_daily_auto_trading")
if os.path.isdir(dir_name):
os.rmdir(dir_name)
shutil.rmtree(dir_name)
os.mkdir(dir_name)
today = datetime.today().strftime('%Y%m%d')

View File

@@ -18,9 +18,7 @@ class SlackBot:
def post_to_slack(self, stock_code, stock_name, type, price, count):
try:
this_time = datetime.now()
text = "DATE TIME:" + this_time.strftime(
'%Y-%m-%d %H:%M:%S') + ", " + "stock_code:" + stock_code + ", " + "stock_name:" + stock_name + ", " + "type:" + type + ", " + "price:" + str(
price) + ", " + "count:" + str(count)
text = "DATE TIME:" + this_time.strftime('%Y-%m-%d %H:%M:%S') + ", " + "stock_code:" + stock_code + ", " + "stock_name:" + stock_name + ", " + "type:" + type + ", " + "price:" + str(price) + ", " + "count:" + str(count)
result = self.client.chat_postMessage(
channel=self.CHANNEL_ID,
text=text