From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8E3D91381F3 for ; Fri, 21 Dec 2012 20:39:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4588221C001; Fri, 21 Dec 2012 20:39:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A15FC21C001 for ; Fri, 21 Dec 2012 20:39:13 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B9F1733D929 for ; Fri, 21 Dec 2012 20:39:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 50B43E543C for ; Fri, 21 Dec 2012 20:39:11 +0000 (UTC) From: "Magnus Granberg" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Magnus Granberg" Message-ID: <1356122339.0c793bdfa9905d603d3d0c8d342000a3fe9f9c23.zorry@gentoo> Subject: [gentoo-commits] dev/zorry:master commit in: gobs/bin/ X-VCS-Repository: dev/zorry X-VCS-Files: gobs/bin/gobs_guest_jobs gobs/bin/gobs_host_jobs X-VCS-Directories: gobs/bin/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: 0c793bdfa9905d603d3d0c8d342000a3fe9f9c23 X-VCS-Branch: master Date: Fri, 21 Dec 2012 20:39:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: dba983bf-aeea-4b4e-8edf-da26a941e6fd X-Archives-Hash: 7ecf2b4c3a6e37b7074079c5ec4d27fb commit: 0c793bdfa9905d603d3d0c8d342000a3fe9f9c23 Author: Magnus Granberg gentoo org> AuthorDate: Fri Dec 21 20:38:59 2012 +0000 Commit: Magnus Granberg gentoo org> CommitDate: Fri Dec 21 20:38:59 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/zorry.git;a=commit;h=0c793bdf Update the bins with some more code --- gobs/bin/gobs_guest_jobs | 8 ++++++-- gobs/bin/gobs_host_jobs | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gobs/bin/gobs_guest_jobs b/gobs/bin/gobs_guest_jobs index 9c4296f..2333d62 100755 --- a/gobs/bin/gobs_guest_jobs +++ b/gobs/bin/gobs_guest_jobs @@ -13,6 +13,7 @@ import portage import sys import os import time +from multiprocessing import Process def main(): repeat = True @@ -25,14 +26,17 @@ def main(): add_gobs_logs(conn, "Job and build deamon started.", "info", config_id) init_build_job = build_job_action(conn, config_id) while repeat: + if not conn.is_connected() is True: + conn.reconnect(attempts=2, delay=1) jobs_main(conn, config_profile) if check_configure_guest(conn, config_id) is not True: time.sleep(6) continue else: - procces_build_jobs() + p = Process(target=init_build_job.procces_build_jobs,) + p.start() + p.join() repeat = True - time.sleep(6) conn.close if __name__ == "__main__": diff --git a/gobs/bin/gobs_host_jobs b/gobs/bin/gobs_host_jobs index 5273430..162ac43 100755 --- a/gobs/bin/gobs_host_jobs +++ b/gobs/bin/gobs_host_jobs @@ -15,7 +15,7 @@ def main(): gobs_settings_dict=reader.read_gobs_settings_all() config_profile = gobs_settings_dict['gobs_config'] CM=connectionManager() - conn = CM.getConnection() + conn = CM.newConnection() config_id = get_config_id(conn, config_profile) add_gobs_logs(conn, "Job deamon started", "info", config_id) repeat = True @@ -23,7 +23,7 @@ def main(): jobs_main(conn, config_profile) repeat = False time.sleep(60) - CM.putConnection(conn) + conn.close if __name__ == "__main__": main() \ No newline at end of file