summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-x[-rw-r--r--]scripts/daily_cleanup.py3
-rwxr-xr-xscripts/reporead.py8
2 files changed, 7 insertions, 4 deletions
diff --git a/scripts/daily_cleanup.py b/scripts/daily_cleanup.py
index 98f997bf..fcc5bce5 100644..100755
--- a/scripts/daily_cleanup.py
+++ b/scripts/daily_cleanup.py
@@ -1,3 +1,6 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
from django.db import backend, connection, transaction
""" Daily cleanup file
This purges the session data that is old from the session table.
diff --git a/scripts/reporead.py b/scripts/reporead.py
index 5ac2f82d..c9d9e9e9 100755
--- a/scripts/reporead.py
+++ b/scripts/reporead.py
@@ -184,9 +184,9 @@ def db_update(archname, pkgs):
# Try to catch those random orphaning issues that make Eric so unhappy.
if len(syncset) < len(dbset) * .5:
logger.error(".db.tar.gz has less than 50% the number of packages in the web database")
- raise SomethingFishyException(
- 'it looks like the syncdb is twice as big as the new'
- 'packages. WTF?')
+ if repository.name != 'Testing':
+ raise SomethingFishyException(
+ 'It looks like the syncdb is half the size of the web db. WTF?')
if len(syncset) < len(dbset) * .75:
logger.warning(".db.tar.gz has 75% the number of packages in the web database.")
@@ -197,7 +197,7 @@ def db_update(archname, pkgs):
## maybe later we can add logic to match pkgbuild maintainers
## to db maintainer ids
pkg = Package(
- repo = repository, arch=architecture, maintainer_id = 0,
+ repo = repository, arch = architecture, maintainer_id = 0,
needupdate = False, url = p.url, last_update = now,
pkgname = p.name, pkgver = p.ver, pkgrel = p.rel,
pkgdesc = p.desc, license = p.license)