Author: eallen
Date: 2009-05-11 09:31:02 -0400 (Mon, 11 May 2009)
New Revision: 3373
Modified:
mgmt/trunk/cumin/python/cumin/grid/job.py
mgmt/trunk/cumin/python/cumin/grid/job.strings
Log:
Removed the outer joins on job stats from the jobs queries since there are no job stats.
Using job.qmf_update time for selecting instead.
Modified: mgmt/trunk/cumin/python/cumin/grid/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/job.py 2009-05-08 20:11:51 UTC (rev 3372)
+++ mgmt/trunk/cumin/python/cumin/grid/job.py 2009-05-11 13:31:02 UTC (rev 3373)
@@ -1331,8 +1331,8 @@
if not phase:
phase = self.get(session)
- alive = "((c.qmf_update_time is null or " + \
- "c.qmf_update_time <= now() - interval '10 minutes')" +
\
+ alive = "((j.qmf_update_time is null or " + \
+ "j.qmf_update_time <= now() - interval '10 minutes')" +
\
" and j.qmf_delete_time is null and j.job_status != %i)" %
JobStatusInfo.get_status_int("Removed")
if phase == "a":
Modified: mgmt/trunk/cumin/python/cumin/grid/job.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/job.strings 2009-05-08 20:11:51 UTC (rev 3372)
+++ mgmt/trunk/cumin/python/cumin/grid/job.strings 2009-05-11 13:31:02 UTC (rev 3373)
@@ -17,8 +17,6 @@
j.cmd,
j.qmf_delete_time
from job as j
-left outer join job_stats as c on c.id = j.stats_curr_id
-left outer join job_stats as p on p.id = j.stats_prev_id
inner join scheduler as s on s.id = j.scheduler_id
inner join submitter as b on b.id = j.submitter_id
{sql_where}
@@ -30,16 +28,12 @@
j.id,
j.custom_id
from job as j
-left outer join job_stats as c on c.id = j.stats_curr_id
-left outer join job_stats as p on p.id = j.stats_prev_id
inner join scheduler as s on s.id = j.scheduler_id
inner join submitter as b on b.id = j.submitter_id
[JobSet.count_sql]
select count(1)
from job as j
-left outer join job_stats as c on c.id = j.stats_curr_id
-left outer join job_stats as p on p.id = j.stats_prev_id
inner join scheduler as s on s.id = j.scheduler_id
inner join submitter as b on b.id = j.submitter_id
{sql_where}
Show replies by date