Force refresh
This commit is contained in:
parent
073fab3566
commit
95f8d6d3ff
1 changed files with 5 additions and 1 deletions
|
|
@ -147,7 +147,8 @@ def import_opml(opml_file):
|
|||
|
||||
@cli.command(name="refresh")
|
||||
@click.argument("url", required=False, default=None)
|
||||
def refresh(url):
|
||||
@click.option("--force", "-f", default=False, is_flag=True)
|
||||
def refresh(url, force):
|
||||
"""Refresh one or more feeds.
|
||||
|
||||
If a URL is specified, refresh that URL. Otherwise, refresh all subscribed
|
||||
|
|
@ -164,6 +165,9 @@ def refresh(url):
|
|||
else:
|
||||
feeds = db.load_all_meta()
|
||||
|
||||
if force:
|
||||
feeds = [feed.FeedMeta.from_url(f.url) for f in feeds]
|
||||
|
||||
click.echo(f"Refreshing {len(feeds)} feed(s)...")
|
||||
results = asyncio.run(feed.fetch_many(feeds))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue