[aur-dev] [PATCH 4/4] remove 'progress' debug output
elij
elij.mx at gmail.com
Tue Apr 5 20:54:12 EDT 2011
it really doesn't take that long to run the script, so remove the noisy
progress output
---
support/schema/gendummydata.py | 23 +++++------------------
1 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/support/schema/gendummydata.py b/support/schema/gendummydata.py
index 6ad4fb2..7e0c949 100755
--- a/support/schema/gendummydata.py
+++ b/support/schema/gendummydata.py
@@ -150,7 +150,7 @@ out.write("BEGIN;\n")
# Begin by creating the User statements
#
-log.debug("Creating SQL statements for users.")
+log.debug("Creating SQL statements for users...")
count = 0
for u in user_keys:
account_type = 1 # default to normal user
@@ -177,9 +177,7 @@ for u in user_keys:
" VALUES (%d, %d, '%s', '%s at example.com', MD5('%s'));\n")
s = s % (seen_users[u], account_type, u, u, u)
out.write(s)
- if count % 10 == 0:
- log.debug("working...")
- count += 1
+
log.debug("Number of developers: %d" % len(developers))
log.debug("Number of trusted users: %d" % len(trustedusers))
log.debug("Number of users: %d" % (MAX_USERS-len(developers)-len(trustedusers)))
@@ -187,7 +185,7 @@ log.debug("Number of packages: %d" % MAX_PKGS)
# Create the package statements
#
-log.debug("Creating SQL statements for packages.")
+log.debug("Creating SQL statements for packages...")
count = 0
for p in seen_pkgs.keys():
NOW = int(time.time())
@@ -212,9 +210,6 @@ for p in seen_pkgs.keys():
s = s % (seen_pkgs[p], p, genVersion(), genCategory(), NOW, uuid, muid)
out.write(s)
- if count % 100 == 0:
- log.debug("working...")
- count += 1
# create random comments for this package
#
@@ -230,7 +225,7 @@ for p in seen_pkgs.keys():
# Cast votes
#
track_votes = {}
-log.debug("Casting votes for packages.")
+log.debug("Casting votes for packages...")
count = 0
for u in user_keys:
num_votes = random.randrange(int(len(seen_pkgs)*VOTING[0]),
@@ -247,9 +242,6 @@ for u in user_keys:
track_votes[pkg] = 0
track_votes[pkg] += 1
out.write(s)
- if count % 100 == 0:
- log.debug("working...")
- count += 1
# Update statements for package votes
#
@@ -260,7 +252,7 @@ for p in track_votes.keys():
# Create package dependencies and sources
#
-log.debug("Creating statements for package depends/sources.")
+log.debug("Creating statements for package depends/sources...")
count = 0
for p in seen_pkgs.keys():
num_deps = random.randrange(PKG_DEPS[0], PKG_DEPS[1])
@@ -286,11 +278,6 @@ for p in seen_pkgs.keys():
s = s % (seen_pkgs[p], src)
out.write(s)
- if count % 100 == 0:
- log.debug("working...")
- count += 1
-
-
# close output file
#
out.write("COMMIT;\n")
--
1.7.4.1
More information about the aur-dev
mailing list