mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 17:36:18 -05:00
Moving periodic download logic into manager so the manager can call it when it is enabled.
This commit is contained in:
parent
00acd9d891
commit
e80f24f690
4 changed files with 40 additions and 19 deletions
|
|
@ -46,7 +46,7 @@ class ArchiveDownloader(Downloader, ABC):
|
|||
return DownloadResult(success=True, location=f'/archive/{archive.id}')
|
||||
|
||||
@optional_session
|
||||
def already_downloaded(self, urls: List[str], session: Session = None) -> List:
|
||||
def already_downloaded(self, *urls: List[str], session: Session = None) -> List:
|
||||
archives = list(session.query(Archive).filter(Archive.url.in_(urls)))
|
||||
return archives
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue