mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-15 07:34:27 -04:00
use database for num_outputs instead of legacy json
This commit is contained in:
parent
7f2c834ea3
commit
411fdcac87
1 changed files with 2 additions and 1 deletions
|
@ -114,7 +114,7 @@ class Snapshot(models.Model):
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def num_outputs(self):
|
def num_outputs(self):
|
||||||
return self.as_link().num_outputs
|
return self.archiveresult_set.filter(status='succeeded').count()
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def url_hash(self):
|
def url_hash(self):
|
||||||
|
@ -138,6 +138,7 @@ class Snapshot(models.Model):
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def history(self):
|
def history(self):
|
||||||
|
# TODO: use ArchiveResult for this instead of json
|
||||||
from ..index import load_link_details
|
from ..index import load_link_details
|
||||||
return load_link_details(self.as_link()).history
|
return load_link_details(self.as_link()).history
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue