2022-08-31 13:20:49 +03:00
|
|
|
from src import listener_context, listener_mention, imdb_datasets_worker
|
|
|
|
from config import logger_default_level
|
2022-09-07 02:55:12 +03:00
|
|
|
from loguru import logger
|
2022-09-03 18:42:13 +03:00
|
|
|
import time
|
2022-09-07 02:55:12 +03:00
|
|
|
import sys
|
2022-08-31 13:20:49 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2022-09-07 02:55:12 +03:00
|
|
|
logger.remove()
|
|
|
|
logger.add(sink=sys.stderr, level=logger_default_level)
|
2022-09-12 17:41:31 +03:00
|
|
|
logger.add(sink='suggestions.log', level='INFO', filter='src.listener_context')
|
2022-08-31 13:20:49 +03:00
|
|
|
|
2022-09-01 16:17:36 +03:00
|
|
|
listener_mention.run_scan_notif() # Слушаем упоминания в фоне
|
2022-09-03 18:42:13 +03:00
|
|
|
time.sleep(1)
|
2022-08-31 13:20:49 +03:00
|
|
|
|
|
|
|
listener_context.scan_context_thread() # Слушаем тред на новые предложения фильмов
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|