From: "Magnus Granberg" <zorry@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/zorry:master commit in: gobs/bin/
Date: Sat, 28 Apr 2012 01:14:55 +0000 (UTC) [thread overview]
Message-ID: <1335575684.b01077005c7cea192e76bebb66e95aa3baf042ab.zorry@gentoo> (raw)
commit: b01077005c7cea192e76bebb66e95aa3baf042ab
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 28 01:14:44 2012 +0000
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Sat Apr 28 01:14:44 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/zorry.git;a=commit;h=b0107700
fix the multiprocessing code part2
---
gobs/bin/gobs_updatedb | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/gobs/bin/gobs_updatedb b/gobs/bin/gobs_updatedb
index 12d33c0..d7bfbee 100755
--- a/gobs/bin/gobs_updatedb
+++ b/gobs/bin/gobs_updatedb
@@ -88,7 +88,7 @@ def update_cpv_db(mysettings):
@type: dict
@parms: config options from the config file
"""
- print "Checking categories, package, ebuilds"
+ logging.info("Checking categories, package, ebuilds")
# Setup portdb, gobs_categories, gobs_old_cpv, package
myportdb = portage.portdbapi(mysettings=mysettings)
package_id_list_tree = []
@@ -97,21 +97,18 @@ def update_cpv_db(mysettings):
package_list_tree = myportdb.cp_all()
# Use all exept 2 cores when multiprocessing
pool_cores= multiprocessing.cpu_count()
- print "pool_cores", pool_cores
- if pool_cores > "3":
+ if pool_cores >= 3:
use_pool_cores = pool_cores - 2
else:
use_pool_cores = 1
- print "use_pool_cores", use_pool_cores
pool = multiprocessing.Pool(processes=use_pool_cores)
- sys.exit()
# Run the update package for all package in the list in
# a multiprocessing pool
for package_line in sorted(package_list_tree):
pool.apply_async(update_cpv_db_pool, (mysettings, package_line,))
pool.close()
pool.join()
- print "Checking categories, package and ebuilds done"
+ logging.info("Checking categories, package and ebuilds done")
def main():
# Main
@@ -129,6 +126,7 @@ def main():
# Update the cpv db
update_cpv_db(mysettings)
CM.closeAllConnections()
+ logging.info("Update db ... Done.")
if __name__ == "__main__":
main()
\ No newline at end of file
next reply other threads:[~2012-04-28 1:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-28 1:14 Magnus Granberg [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-12-21 20:39 [gentoo-commits] dev/zorry:master commit in: gobs/bin/ Magnus Granberg
2012-12-21 20:35 Magnus Granberg
2012-04-29 16:38 Magnus Granberg
2012-04-29 16:05 Magnus Granberg
2012-04-29 15:58 Magnus Granberg
2012-04-29 14:43 Magnus Granberg
2012-04-28 1:04 Magnus Granberg
2012-04-27 21:17 Magnus Granberg
2012-04-27 20:59 Magnus Granberg
2012-04-27 20:30 Magnus Granberg
2012-04-27 20:28 Magnus Granberg
2012-04-27 20:28 Magnus Granberg
2011-09-28 1:17 Magnus Granberg
2011-09-26 23:50 Magnus Granberg
2011-09-26 23:48 Magnus Granberg
2011-09-13 1:06 Magnus Granberg
2011-07-30 1:07 Magnus Granberg
2011-07-29 15:31 Magnus Granberg
2011-07-10 15:31 Magnus Granberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335575684.b01077005c7cea192e76bebb66e95aa3baf042ab.zorry@gentoo \
--to=zorry@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox