euscanwww/commands: don't keep all logs
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
This commit is contained in:
parent
03a7a0a277
commit
c9f9331aaf
@ -105,12 +105,16 @@ class Command(BaseCommand):
|
|||||||
self.store_result(options, package, log)
|
self.store_result(options, package, log)
|
||||||
|
|
||||||
def store_result(self, options, package, log):
|
def store_result(self, options, package, log):
|
||||||
|
# Remove previous logs
|
||||||
|
EuscanResult.objects.filter(package=package).delete()
|
||||||
|
|
||||||
obj = EuscanResult()
|
obj = EuscanResult()
|
||||||
obj.package = package
|
obj.package = package
|
||||||
obj.result = log
|
obj.result = log
|
||||||
obj.datetime = datetime.now()
|
obj.datetime = datetime.now()
|
||||||
obj.save()
|
obj.save()
|
||||||
|
|
||||||
|
|
||||||
def store_package(self, options, cpv):
|
def store_package(self, options, cpv):
|
||||||
cat, pkg, ver, rev = portage.catpkgsplit(cpv)
|
cat, pkg, ver, rev = portage.catpkgsplit(cpv)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user