From 23f25e52fc9e112e66801613f5721e7d5dbab0f9 Mon Sep 17 00:00:00 2001 From: Dusty Phillips Date: Fri, 6 Feb 2009 16:30:02 -0500 Subject: Misc script changes that haven't been committed. --- scripts/daily_cleanup.py | 3 +++ scripts/reporead.py | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) mode change 100644 => 100755 scripts/daily_cleanup.py diff --git a/scripts/daily_cleanup.py b/scripts/daily_cleanup.py old mode 100644 new mode 100755 index 98f997bf..fcc5bce5 --- 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) -- cgit v1.2.3-2-g168b