diff options
author | Dusty Phillips <dusty@gerolde.archlinux.org> | 2009-02-06 22:30:02 +0100 |
---|---|---|
committer | Dusty Phillips <dusty@gerolde.archlinux.org> | 2009-02-06 22:30:02 +0100 |
commit | 23f25e52fc9e112e66801613f5721e7d5dbab0f9 (patch) | |
tree | 62d826bc3c64136f836273727fb5190194a587e1 /scripts | |
parent | 1ad008f335f3ba582a00454ae6a04442642a9ed2 (diff) | |
download | archweb-23f25e52fc9e112e66801613f5721e7d5dbab0f9.tar.gz archweb-23f25e52fc9e112e66801613f5721e7d5dbab0f9.tar.xz |
Misc script changes that haven't been committed.
Diffstat (limited to 'scripts')
-rwxr-xr-x[-rw-r--r--] | scripts/daily_cleanup.py | 3 | ||||
-rwxr-xr-x | scripts/reporead.py | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/scripts/daily_cleanup.py b/scripts/daily_cleanup.py index 98f997b..fcc5bce 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 5ac2f82..c9d9e9e 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) |