Gentoo Archives: gentoo-commits

From: Magnus Granberg <zorry@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/zorry:master commit in: gobs/bin/, gobs/pym/
Date: Sun, 29 Apr 2012 13:16:21
Message-Id: 1335705354.ef2323376f424e347d5f983b133bd9e114a44c61.zorry@gentoo
1 commit: ef2323376f424e347d5f983b133bd9e114a44c61
2 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 29 13:15:54 2012 +0000
4 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 29 13:15:54 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/zorry.git;a=commit;h=ef232337
7
8 start of the job host deamon part2
9
10 ---
11 gobs/bin/gobs_host_jobs | 6 +++---
12 gobs/pym/pgsql.py | 6 +++---
13 2 files changed, 6 insertions(+), 6 deletions(-)
14
15 diff --git a/gobs/bin/gobs_host_jobs b/gobs/bin/gobs_host_jobs
16 index 856041c..e6e5ead 100755
17 --- a/gobs/bin/gobs_host_jobs
18 +++ b/gobs/bin/gobs_host_jobs
19 @@ -28,14 +28,14 @@ def main():
20 repeat = True
21 while repeat:
22 conn = CM.getConnection()
23 - job jobid = check_job_list(conn, config_profile)
24 - print("job jobid:" + job + " " + jobid)
25 + job = check_job_list(conn, config_profile)
26 + print("job jobid:" + job)
27 if job is None:
28 time.sleep(60)
29 CM.putConnection(conn)
30 continue
31 else:
32 - update_job_list("Runing", jobid)
33 + update_job_list("Runing", job[1])
34 repeat = False
35 CM.putConnection(conn)
36 time.sleep(60)
37
38 diff --git a/gobs/pym/pgsql.py b/gobs/pym/pgsql.py
39 index 21c204d..6ac08c8 100644
40 --- a/gobs/pym/pgsql.py
41 +++ b/gobs/pym/pgsql.py
42 @@ -644,10 +644,10 @@ def check_job_list(connection, config_profile):
43 cursor.execute(sqlQ1, (config_profile,))
44 config_nr = cursor.fetchone()
45 cursor.execute(sqlQ2, (config_nr,))
46 - job jobid = cursor.fetchone()
47 + job = cursor.fetchone()
48 if job is None:
49 - return None None
50 - return job jobid
51 + return None
52 + return job
53
54 def update_job_list(status, jobid)
55 cursor = connection.cursor()