From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SOVLd-0001Mn-I8 for garchives@archives.gentoo.org; Sun, 29 Apr 2012 14:43:37 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 35BBCE0508; Sun, 29 Apr 2012 14:43:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id F2872E0508 for ; Sun, 29 Apr 2012 14:43:27 +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 61E5A1B4019 for ; Sun, 29 Apr 2012 14:43:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 24736E542C for ; Sun, 29 Apr 2012 14:43:26 +0000 (UTC) From: "Magnus Granberg" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Magnus Granberg" Message-ID: <1335710593.6cf9a8559b9c696cb067ec05f7ed5ecda0455d06.zorry@gentoo> Subject: [gentoo-commits] dev/zorry:master commit in: gobs/bin/ X-VCS-Repository: dev/zorry X-VCS-Files: gobs/bin/gobs_host_jobs~ X-VCS-Directories: gobs/bin/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: 6cf9a8559b9c696cb067ec05f7ed5ecda0455d06 X-VCS-Branch: master Date: Sun, 29 Apr 2012 14:43:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 33d47ee5-7909-41dd-9282-46b664248bb2 X-Archives-Hash: d3814cbeebb8a9e95bb32a7dacbeca70 commit: 6cf9a8559b9c696cb067ec05f7ed5ecda0455d06 Author: Magnus Granberg gentoo org> AuthorDate: Sun Apr 29 14:43:13 2012 +0000 Commit: Magnus Granberg gentoo org> CommitDate: Sun Apr 29 14:43:13 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/zorry.git;a=3D= commit;h=3D6cf9a855 adding updatedb to job host deamon part2 --- gobs/bin/gobs_host_jobs~ | 55 ----------------------------------------= ------ 1 files changed, 0 insertions(+), 55 deletions(-) diff --git a/gobs/bin/gobs_host_jobs~ b/gobs/bin/gobs_host_jobs~ deleted file mode 100755 index 87e856e..0000000 --- a/gobs/bin/gobs_host_jobs~ +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/python -# Copyright 2006-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -from __future__ import print_function - -from gobs.init_setup_profile import setup_profile_main -from gobs.readconf import get_conf_settings -from gobs.updatedb import update_db_main - -reader =3D get_conf_settings() -gobs_settings_dict=3Dreader.read_gobs_settings_all() - -# make a CM -from gobs.ConnectionManager import connectionManager -CM=3DconnectionManager(gobs_settings_dict) -#selectively import the pgsql/mysql querys -if CM.getName()=3D=3D'pgsql': - from gobs.pgsql import * -import logging - -def main(): - # Main - config_profile =3D gobs_settings_dict['gobs_config'] - # Logging - logging.basicConfig(filename=3Dgobs_settings_dict['gobs_logfile'], \ - format=3D'%(levelname)s: %(asctime)s %(message)s', level=3Dlogging.INF= O) - repeat =3D True - logging.info("Job deamon started.") - while repeat: - conn =3D CM.getConnection() - job =3D check_job_list(conn, config_profile) - =09 - if job is None: - time.sleep(60) - CM.putConnection(conn) - continue - else: - logging.info("Job: %s Type: %s Config: %s", job[1], job[0], config_pr= ofile) - if job[0] =3D=3D "updatedb": - update_job_list(conn, "Runing", job[1]) - logging.info("Job %s is runing. Config: %s", job[0], config_profile) - result =3D update_db_main() - if result is True - update_job_list(conn, "Done", job[1]) - logging.info("Job %s is done. Config: %s", job[0], config_profile) - else: - update_job_list(conn, "Fail", job[1]) - logging.info("Job %s did fail. Config: %s", job[0], config_profile) - repeat =3D False - CM.putConnection(conn) - time.sleep(60) - -if __name__ =3D=3D "__main__": - main() \ No newline at end of file