otaku_info.background package

Submodules

otaku_info.background.anilist module

otaku_info.background.anilist.update_anilist_data(usernames: Optional[List[otaku_info.db.ServiceUsername.ServiceUsername]] = None)

Retrieves all entries on the anilists of all users that provided an anilist username :param usernames: Can be used to override the usernames to use :return: None

otaku_info.background.anilist_manga_chapter_guesses module

otaku_info.background.anilist_manga_chapter_guesses.update_anilist_manga_chapter_guesses()

Updates the manga chapter guesses for anilist items :return: None

otaku_info.background.ln_releases module

otaku_info.background.ln_releases.update_ln_releases()

Updates the light novel releases :return: None

otaku_info.background.mangadex module

otaku_info.background.mangadex.update_mangadex_data()

Loads the newest mangadex information and updates the mangadex entries in the database. :return: None

otaku_info.background.notifications module

otaku_info.background.notifications.handle_notification(media_user_state: otaku_info.db.MediaUserState.MediaUserState, settings: otaku_info.db.NotificationSetting.NotificationSetting)

Handles a single notification :param media_user_state: The user state for which to notify :param settings: The notification settings :return: None

otaku_info.background.notifications.send_new_update_notifications()

Sends out telegram notifications for media updates :return: None

Module contents

otaku_info.background.bg_tasks: Dict[str, Tuple[int, Callable]] = {'anilist_chapter_guesses': (1800, <function update_anilist_manga_chapter_guesses>), 'anilist_update': (300, <function update_anilist_data>), 'ln_release_updates': (86400, <function update_ln_releases>), 'mangadex_update': (86400, <function update_mangadex_data>), 'update_notifications': (60, <function send_new_update_notifications>)}

A dictionary containing background tasks for the flask application