public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] dev/zorry:master commit in: gobs/bin/, gobs/pym/
@ 2012-05-01  1:12 99% Magnus Granberg
  0 siblings, 0 replies; 1+ results
From: Magnus Granberg @ 2012-05-01  1:12 UTC (permalink / raw
  To: gentoo-commits

commit:     013ae1a327652f270df045b3779f29aaaeb4a2c1
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Tue May  1 01:11:42 2012 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Tue May  1 01:11:42 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/zorry.git;a=commit;h=013ae1a3

fix code in check_setup.py

---
 gobs/bin/gobs_guest_jobs |    3 ++-
 gobs/pym/check_setup.py  |   17 +++++++++--------
 gobs/pym/updatedb.py     |    7 ++++---
 3 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/gobs/bin/gobs_guest_jobs b/gobs/bin/gobs_guest_jobs
index 43b8cc1..6fd55ae 100755
--- a/gobs/bin/gobs_guest_jobs
+++ b/gobs/bin/gobs_guest_jobs
@@ -33,6 +33,7 @@ def main_loop(config_profile):
 		if job is None:
 			CM.putConnection(conn)
 			if check_configure_guest(config_profile) is not True:
+				time.sleep(60)
 				continue
 			else:
 				init_queru = queruaction(config_profile)
@@ -83,7 +84,7 @@ def main_loop(config_profile):
 					update_job_list(conn, "Fail", job[1])
 					logging.info("Job %s did fail. Config: %s", job[0], config_profile)			
 		repeat = False
-		time.sleep(10)
+		time.sleep(60)
 		CM.putConnection(conn)
 	return
 

diff --git a/gobs/pym/check_setup.py b/gobs/pym/check_setup.py
index c0ba2ee..3a5b404 100644
--- a/gobs/pym/check_setup.py
+++ b/gobs/pym/check_setup.py
@@ -2,6 +2,8 @@ from __future__ import print_function
 import portage
 import os
 import errno
+import logging
+
 from git import *
 from gobs.text import get_file_text
 
@@ -16,11 +18,10 @@ if CM.getName()=='pgsql':
 	from gobs.pgsql import *
 
 def check_make_conf():
-  # FIXME: mark any config updating true in the db when updating the configs
   # Get the config list
   conn=CM.getConnection()
   config_list_all = get_config_list_all(conn)
-  print("Checking configs for changes and errors")
+  logging.info("Checking configs for changes and errors")
   configsDict = {}
   for config_id in config_list_all:
 	  attDict={}
@@ -40,20 +41,20 @@ def check_make_conf():
 	  except Exception as e:
 		  attDict['config_error'] = e
 		  attDict['active'] = 'False'
-		  print("Fail", config_id[0])
+		  logging.info("%s FAIL!", config_id[0])
 	  else:
 		  attDict['config_error'] = ''
 		  attDict['active'] = 'True'
-		  print("Pass", config_id[0])
+		  logging.info("%s PASS", config_id[0])
 	  # Get the checksum of make.conf
 	  make_conf_checksum_tree = portage.checksum.sha256hash(make_conf_file)[0]
-	  # Check if we have change the make.conf and update the db with it
+	  logging.info("make.conf checksum is %s on %s", make_conf_checksum_tree, config_id[0])
 	  attDict['make_conf_text'] = get_file_text(make_conf_file)
 	  attDict['make_conf_checksum_tree'] = make_conf_checksum_tree
-	  configsDict[config_id]=attDict
-  update__make_conf(conn,configsDict)
+	  configsDict[config_id[0]]=attDict
+  update__make_conf(conn, configsDict)
   CM.putConnection(conn)
-  print("Updated configurtions")
+  logging.info("Checking configs for changes and errors ... Done")
 
 def check_make_conf_guest(config_profile):
 	conn=CM.getConnection()

diff --git a/gobs/pym/updatedb.py b/gobs/pym/updatedb.py
index 0277396..f718bc4 100755
--- a/gobs/pym/updatedb.py
+++ b/gobs/pym/updatedb.py
@@ -103,9 +103,10 @@ def update_cpv_db(mysettings):
 	# 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() 
+		update_cpv_db_pool(mysettings, package_line)
+		# pool.apply_async(update_cpv_db_pool, (mysettings, package_line,))
+	# pool.close()
+	# pool.join() 
 	logging.info("Checking categories, package and ebuilds done")
 
 def update_db_main():



^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2012-05-01  1:12 99% [gentoo-commits] dev/zorry:master commit in: gobs/bin/, gobs/pym/ Magnus Granberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox