Разработан чат-бот
This commit is contained in:
17
ai/ai.py
Normal file
17
ai/ai.py
Normal file
@ -0,0 +1,17 @@
|
||||
import database
|
||||
import logging
|
||||
import traceback
|
||||
import time
|
||||
|
||||
import config
|
||||
|
||||
|
||||
def update_statistics():
|
||||
if not config.AI.enabled:
|
||||
return
|
||||
while True:
|
||||
try:
|
||||
database.update_statistics(config.AI.k)
|
||||
except Exception:
|
||||
logging.error('\n\t%s' % '\n\t'.join(traceback.format_exc().split('\n')).rstrip())
|
||||
time.sleep(config.AI.update_frequency)
|
Reference in New Issue
Block a user