o
    r9h  ใ                   @   sh   d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	m
Z
 d dlmZ d dlZdd	 Zd
d ZdS )้    )ฺBackgroundScheduler)ฺparse_motie_organization_posts)ฺupdate_motie_org_table)ฺupdate_motie_vip_table)ฺis_article_processedฺmark_article_as_processed)ฺsend_motie_alert_to_allNc                  C   s   t dt dก  t } | D ]0}|d }t|r!t d|  qt d| d|d   t| t| t d t  t  qd S )	Nu   
๐ ์คํ ์๊ฐ: z%Y-%m-%d %H:%M:%Sฺ	articleIdu!   ๐ ์ด๋ฏธ ์ฒ๋ฆฌ๋ ๊ฒ์๋ฌผ: u$   ๐จ ์๋ก์ด ์ธ์ฌ๋ฐ๋ น ๋ฐ๊ฒฌ: z - ฺtitleu4   ๐ ์กฐ์ง๋ ๋ฐ VIP ์ ๋ณด ์๋ฐ์ดํธ ์์...)	ฺprintฺtimeฺstrftimer   r   r   r   r   r   )ฺpostsฺpostฺ
article_idฉ r   ๚-/var/www/html/bot/scripts/scheduled_runner.pyฺscheduled_job   s   ๔r   c                  C   s0   t  } | jtddd |  ก  td t  d S )Nฺcronr   )ฺminuteuE   ๐ MOTIE ์ค์ผ์ค๋ฌ๊ฐ ๋ฐฑ๊ทธ๋ผ์ด๋์์ ์คํ ์ค์๋๋ค.)r   ฺadd_jobr   ฺstartr   )ฺ	schedulerr   r   r   ฺstart_scheduler   s
   
r   )ฺ!apscheduler.schedulers.backgroundr   ฺservices.motie_parserr   ฺservices.motie_org_servicer   ฺservices.motie_vip_servicer   ฺservices.motie_servicer   r   ฺservices.telegram_servicer   r   r   r   r   r   r   r   ฺ<module>   s   