Moving periodic download logic into manager so the manager can call it when it is enabled.

This commit is contained in:
Roland 2022-09-25 17:27:48 -06:00
parent 00acd9d891
commit e80f24f690
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
4 changed files with 40 additions and 19 deletions

View file

@ -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