mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-24 15:13:03 +02:00
use database for num_outputs instead of legacy json
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user