def min_job(): cpys = commen.get_cpys() urls = commen.get_urls(cpys) mid_data = get_min_article_count(urls, cpys) em_data = get_emotion_article_count(urls, cpys) saveMinData(mid_data, em_data)
def get_warning_articles(beg_time, end_time): indexs = get_cpys() warnings = {} for index in indexs: company_uuid = get_company_uuid_by_index(index) warnings[company_uuid] = get_articles_by_index(index, beg_time, end_time) return warnings
def get_day_article_count(urls): cons = {"from": "now-1d"} cpys = commen.get_cpys() return get_article_count(urls, cpys, cons)
def day_job(): cpys = commen.get_cpys() urls = commen.get_urls(cpys) data = get_day_article_count(urls) saveDayData(data)
def my_job(): cpys = commen.get_cpys() urls = commen.get_urls(cpys) data = get_article_count(urls, cpys) save_data(data)