Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1"""LICENSE 

2Copyright 2020 Hermann Krumrey <hermann@krumreyh.com> 

3 

4This file is part of otaku-info-web. 

5 

6otaku-info-web is free software: you can redistribute it and/or modify 

7it under the terms of the GNU General Public License as published by 

8the Free Software Foundation, either version 3 of the License, or 

9(at your option) any later version. 

10 

11otaku-info-web is distributed in the hope that it will be useful, 

12but WITHOUT ANY WARRANTY; without even the implied warranty of 

13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 

14GNU General Public License for more details. 

15 

16You should have received a copy of the GNU General Public License 

17along with otaku-info-web. If not, see <http://www.gnu.org/licenses/>. 

18LICENSE""" 

19 

20from typing import Dict, Tuple, Callable 

21from otaku_info_web.background.anilist import fetch_anilist_data 

22from otaku_info_web.background.mangadex import load_id_mappings 

23from otaku_info_web.background.manga_chapters import \ 

24 update_manga_chapter_guesses 

25from otaku_info_web.background.telegram import handle_whoami_requests 

26from otaku_info_web.background.notifications import \ 

27 send_new_manga_chapter_notifications 

28 

29 

30bg_tasks: Dict[str, Tuple[int, Callable]] = { 

31 "anilist_update": (60, fetch_anilist_data), 

32 "update_manga_chapter_guesses": (60 * 60, update_manga_chapter_guesses), 

33 "load_id_mappings": (60 * 60 * 24, load_id_mappings), 

34 "telegram_whoami": (1, handle_whoami_requests), 

35 "manga_chapter_notifications": (60, send_new_manga_chapter_notifications) 

36} 

37""" 

38A dictionary containing background tasks for the flask application 

39"""