From fbf32bf0bee210e616c0b99b0e130dc18d722943 Mon Sep 17 00:00:00 2001 From: jowj Date: Sun, 7 Oct 2018 16:42:56 -0500 Subject: [PATCH] Update mojo to look at proper alerts.log file. --- mojojojo-bot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mojojojo-bot.py b/mojojojo-bot.py index d9880a6..cdbb676 100644 --- a/mojojojo-bot.py +++ b/mojojojo-bot.py @@ -129,11 +129,11 @@ def react_to_message(reaction): def react_to_monitoring(): - results_file = Path("/shared/results.json") + results_file = Path("/shared/alerts.log") does_file_exist = results_file.is_file() logging.info(f"file exists: {does_file_exist}") if results_file.is_file(): - open_file = open("/shared/results.json","r") + open_file = open("/shared/alerts.log","r") logging.info('in file exists conditional') for line in open_file: logging.info('examining item: '+line) @@ -142,7 +142,7 @@ def react_to_monitoring(): channel = get_channel_ID("bots-like-gaston"), text = line ) - os.remove("/shared/results.json") + os.remove("/shared/alerts.log") def get_channel_ID(channelName): @@ -155,7 +155,7 @@ def get_channel_ID(channelName): if __name__ == "__main__": logging.basicConfig(filename='mojojojo.log', level=logging.INFO) logging.info('Started') - results_file = Path("/shared/results.json") + results_file = Path("/shared/alerts.log") if slack_client.rtm_connect(with_team_state=False): print("mojo jojo online, connected, and running!") # Read bot's user ID by calling Web API method `auth.test`