From: "Magnus Granberg" <zorry@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/zorry:master commit in: gobs/bin/
Date: Sun, 29 Apr 2012 14:43:26 +0000 (UTC) [thread overview]
Message-ID: <1335710593.6cf9a8559b9c696cb067ec05f7ed5ecda0455d06.zorry@gentoo> (raw)
commit: 6cf9a8559b9c696cb067ec05f7ed5ecda0455d06
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 29 14:43:13 2012 +0000
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Sun Apr 29 14:43:13 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/zorry.git;a=commit;h=6cf9a855
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 = get_conf_settings()
-gobs_settings_dict=reader.read_gobs_settings_all()
-
-# make a CM
-from gobs.ConnectionManager import connectionManager
-CM=connectionManager(gobs_settings_dict)
-#selectively import the pgsql/mysql querys
-if CM.getName()=='pgsql':
- from gobs.pgsql import *
-import logging
-
-def main():
- # Main
- config_profile = gobs_settings_dict['gobs_config']
- # Logging
- logging.basicConfig(filename=gobs_settings_dict['gobs_logfile'], \
- format='%(levelname)s: %(asctime)s %(message)s', level=logging.INFO)
- repeat = True
- logging.info("Job deamon started.")
- while repeat:
- conn = CM.getConnection()
- job = check_job_list(conn, config_profile)
-
- 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_profile)
- if job[0] == "updatedb":
- update_job_list(conn, "Runing", job[1])
- logging.info("Job %s is runing. Config: %s", job[0], config_profile)
- result = 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 = False
- CM.putConnection(conn)
- time.sleep(60)
-
-if __name__ == "__main__":
- main()
\ No newline at end of file
next reply other threads:[~2012-04-29 14:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-29 14:43 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-28 1:14 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=1335710593.6cf9a8559b9c696cb067ec05f7ed5ecda0455d06.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