18 строки
396 B
Python
18 строки
396 B
Python
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)
|