refactor: status command is functional

This commit is contained in:
Cristian 2020-12-30 12:53:20 -05:00
parent d92083b928
commit 973f8b6abc
5 changed files with 33 additions and 26 deletions

View file

@ -138,7 +138,7 @@ class Snapshot(models.Model):
@cached_property
def snapshot_dir(self):
from ..config import CONFIG
return str(Path(CONFIG['ARCHIVE_DIR']) / self.timestamp)
return Path(CONFIG['ARCHIVE_DIR']) / self.timestamp
@cached_property
def archive_path(self):
@ -173,6 +173,12 @@ class Snapshot(models.Model):
from ..util import is_static_file
return is_static_file(self.url)
@cached_property
def details(self) -> Dict:
# TODO: Define what details are, and return them accordingly
return {"history": {}}
def canonical_outputs(self) -> Dict[str, Optional[str]]:
"""predict the expected output paths that should be present after archiving"""