From 6d28f81801581e2258b1d13eb40b6f6c98beaca0 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 16 Feb 2010 21:08:29 -0600 Subject: reporead: use different timestamp for each package Since these timestamps will differ across repos and arches anyway (for a total of 10 distinct timestamps currently per hour), it isn't really necessary to only use one timestamp. Allow each package to get a unique creation time. Signed-off-by: Dan McGee --- devel/management/commands/reporead.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'devel') diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index 1906a441..733e9d3e 100755 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -176,7 +176,6 @@ def db_update(archname, pkgs): # efficient by not having to go to the database for each package to # SELECT them by name. dbdict = dict([(pkg.pkgname, pkg) for pkg in dbpkgs]) - now = datetime.now() # go go set theory! # thank you python for having a set class <3 @@ -209,7 +208,7 @@ def db_update(archname, pkgs): for p in [x for x in pkgs if x.name in in_sync_not_db]: logger.info("Adding package %s", p.name) pkg = Package(pkgname = p.name, arch = architecture, repo = repository) - populate_pkg(pkg, p, timestamp=now) + populate_pkg(pkg, p) # packages in database and not in syncdb (remove from database) logger.debug("Set theory: Packages in database not in syncdb") @@ -230,7 +229,7 @@ def db_update(archname, pkgs): logger.info("Updating package %s in database", p.name) pkg = Package.objects.get( pkgname=p.name,arch=architecture, repo=repository) - populate_pkg(pkg, p, timestamp=now) + populate_pkg(pkg, p) logger.info('Finished updating Arch: %s' % archname) -- cgit v1.2.3-54-g00ecf