Skip to content

tasks

async_refresh_feed

async_refresh_feed(podcast_id: str) -> None

Given a podcast object, call it's refresh feed function.

Source code in src/podcast_analyzer/tasks.py
def async_refresh_feed(podcast_id: str) -> None:
    """
    Given a podcast object, call it's refresh feed function.
    """
    podcast = Podcast.objects.get(id=podcast_id)
    podcast.refresh_feed()

run_feed_analysis

run_feed_analysis(podcast: Podcast) -> None

Wraps around the instance's feed analysis function.

Source code in src/podcast_analyzer/tasks.py
def run_feed_analysis(podcast: Podcast) -> None:
    """
    Wraps around the instance's feed analysis function.
    """
    logger.debug("Task 'run_feed_analysis' called!")
    asyncio.run(podcast.analyze_feed())
    podcast.schedule_next_refresh()