aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xasync_bot.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/async_bot.py b/async_bot.py
index 3a5aadc..99c4560 100755
--- a/async_bot.py
+++ b/async_bot.py
@@ -142,7 +142,7 @@ def send_message(bot, message, monitor=False):
142 logger.error(get_time() + ": Send Message to Channel Failed") 142 logger.error(get_time() + ": Send Message to Channel Failed")
143 time.sleep(1) 143 time.sleep(1)
144 except Exception: 144 except Exception:
145 logger.error(get_time() + ": Unexpected error: " + sys.exc_info()[0]) 145 logger.error(get_time() + ": Unexpected error: " + str(sys.exc_info()[0]))
146 time.sleep(1) 146 time.sleep(1)
147 147
148 148
@@ -196,7 +196,7 @@ def main():
196 logger.error(get_time() + ': Fetch Cookie Failed') 196 logger.error(get_time() + ': Fetch Cookie Failed')
197 time.sleep(3) 197 time.sleep(3)
198 except Exception: 198 except Exception:
199 logger.error(get_time() + ": Unexpected error: " + sys.exc_info()[0]) 199 logger.error(get_time() + ": Unexpected error: " + str(sys.exc_info()[0]))
200 time.sleep(3) 200 time.sleep(3)
201 201
202 # fetch message 202 # fetch message
@@ -224,7 +224,7 @@ def main():
224 except CookieException: 224 except CookieException:
225 time.sleep(3) 225 time.sleep(3)
226 except Exception: 226 except Exception:
227 logger.error(get_time() + ": Unexpected error: " + sys.exc_info()[0]) 227 logger.error(get_time() + ": Unexpected error: " + str(sys.exc_info()[0]))
228 time.sleep(3) 228 time.sleep(3)
229 229
230 for item in result[::-1]: 230 for item in result[::-1]:
@@ -236,10 +236,10 @@ def main():
236 236
237 message = ingrex.Message(item) 237 message = ingrex.Message(item)
238 if message.ptype == 'PLAYER_GENERATED': 238 if message.ptype == 'PLAYER_GENERATED':
239 logger.info(get_time() + " " + message) 239 logger.info(get_time() + " " + message.msg)
240 if find_message_record(message.guid) is False: 240 if find_message_record(message.guid) is False:
241 insert_message_to_database(message.time, message.guid, message) 241 insert_message_to_database(message.time, message.guid, message.msg)
242 send_message(bot, message, False) 242 send_message(bot, message.msg, False)
243 243
244 time.sleep(10) 244 time.sleep(10)
245 245
@@ -251,5 +251,5 @@ if __name__ == '__main__':
251 try: 251 try:
252 main() 252 main()
253 except Exception: 253 except Exception:
254 send_message(bot, 'Main Unexpected error' + sys.exc_info()[0], True) 254 send_message(bot, 'Main Unexpected error' + str(sys.exc_info()[0]), True)
255 time.sleep(3) \ No newline at end of file 255 time.sleep(3) \ No newline at end of file
Powered by cgit v1.2.3 (git 2.41.0)