details: http://www.bx.psu.edu/hg/galaxy/rev/4e2ad77de095 changeset: 1607:4e2ad77de095 user: Greg Von Kuster <greg@bx.psu.edu> date: Wed Nov 05 10:35:06 2008 -0500 description: Fix jobs report to display jobs in deleted and waiting states. 10 file(s) affected in this change: lib/galaxy/jobs/__init__.py lib/galaxy/webapps/reports/controllers/jobs.py lib/galaxy/webapps/reports/static/january_2008_style/blue/base.css lib/galaxy/webapps/reports/templates/jobs_all_unfinished.mako lib/galaxy/webapps/reports/templates/jobs_per_month_in_error.mako lib/galaxy/webapps/reports/templates/jobs_specified_date_all.mako lib/galaxy/webapps/reports/templates/jobs_specified_date_in_error.mako lib/galaxy/webapps/reports/templates/jobs_specified_month_in_error.mako lib/galaxy/webapps/reports/templates/jobs_tool_for_month.mako lib/galaxy/webapps/reports/templates/jobs_user_for_month.mako diffs (181 lines): diff -r 72252f33edd1 -r 4e2ad77de095 lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py Wed Nov 05 09:28:48 2008 -0500 +++ b/lib/galaxy/jobs/__init__.py Wed Nov 05 10:35:06 2008 -0500 @@ -403,11 +403,11 @@ idata.dataset.refresh() #we need to refresh the base Dataset, since that is where 'state' is stored # don't run jobs for which the input dataset was deleted if idata.deleted: - self.fail( "input data %d was deleted before this job started" % idata.hid ) + self.fail( "input data %d (file: %s) was deleted before the job started" % ( idata.hid, idata.file_name ) ) return JOB_INPUT_DELETED # an error in the input data causes us to bail immediately elif idata.state == idata.states.ERROR: - self.fail( "input data %d is in an error state" % idata.hid ) + self.fail( "input data %d (file: %s) is in an error state" % ( idata.hid, idata.file_name ) ) return JOB_INPUT_ERROR elif idata.state != idata.states.OK: # need to requeue diff -r 72252f33edd1 -r 4e2ad77de095 lib/galaxy/webapps/reports/controllers/jobs.py --- a/lib/galaxy/webapps/reports/controllers/jobs.py Wed Nov 05 09:28:48 2008 -0500 +++ b/lib/galaxy/webapps/reports/controllers/jobs.py Wed Nov 05 10:35:06 2008 -0500 @@ -91,7 +91,8 @@ year_label = start_date.strftime( "%Y" ) q = sa.select( ( sa.func.date( galaxy.model.Job.table.c.create_time ).label( 'date' ), sa.func.count( galaxy.model.Job.table.c.id ).label( 'total_jobs' ) ), - whereclause = sa.and_( galaxy.model.Job.table.c.state == 'error', + whereclause = sa.and_( sa.or_( galaxy.model.Job.table.c.state == 'error', + galaxy.model.Job.table.c.state == 'deleted' ), galaxy.model.Job.table.c.create_time >= start_date, galaxy.model.Job.table.c.create_time < end_date ), from_obj = [ sa.outerjoin( galaxy.model.Job.table, @@ -133,7 +134,8 @@ galaxy.model.Job.table.c.info, ( galaxy.model.User.table.c.email ).label( 'user_email' ), galaxy.model.GalaxySession.table.c.remote_addr ), - whereclause = sa.and_( galaxy.model.Job.table.c.state == 'error', + whereclause = sa.and_( sa.or_( galaxy.model.Job.table.c.state == 'error', + galaxy.model.Job.table.c.state == 'deleted' ), galaxy.model.Job.table.c.create_time >= start_date, galaxy.model.Job.table.c.create_time < end_date ), from_obj = [ sa.outerjoin( galaxy.model.Job.table, @@ -245,6 +247,7 @@ galaxy.model.GalaxySession.table.c.remote_addr ), whereclause = sa.or_( galaxy.model.Job.table.c.state == 'running', galaxy.model.Job.table.c.state == 'queued', + galaxy.model.Job.table.c.state == 'waiting', galaxy.model.Job.table.c.state == 'new' ), from_obj = [ sa.outerjoin( galaxy.model.Job.table, galaxy.model.History.table ).outerjoin( galaxy.model.User.table ).outerjoin( galaxy.model.GalaxySession.table, @@ -297,7 +300,8 @@ msg = '' q = sa.select( ( sa.func.date_trunc( 'month', sa.func.date( galaxy.model.Job.table.c.create_time ) ).label( 'date' ), sa.func.count( galaxy.model.Job.table.c.id ).label( 'total_jobs' ) ), - whereclause = galaxy.model.Job.table.c.state == 'error', + whereclause = sa.or_( galaxy.model.Job.table.c.state == 'error', + galaxy.model.Job.table.c.state == 'deleted' ), from_obj = [ galaxy.model.Job.table ], group_by = [ sa.func.date_trunc( 'month', sa.func.date( galaxy.model.Job.table.c.create_time ) ) ], order_by = [ sa.desc( 'date' ) ] ) diff -r 72252f33edd1 -r 4e2ad77de095 lib/galaxy/webapps/reports/static/january_2008_style/blue/base.css --- a/lib/galaxy/webapps/reports/static/january_2008_style/blue/base.css Wed Nov 05 09:28:48 2008 -0500 +++ b/lib/galaxy/webapps/reports/static/january_2008_style/blue/base.css Wed Nov 05 10:35:06 2008 -0500 @@ -267,6 +267,14 @@ border-bottom: solid #d8b365 1px; font-weight: bold; } +table.colored tr.headerwaiting +{ + background: #ebd9b2; + background-repeat: repeat-x; + background-position: top; + border-bottom: solid #d8b365 1px; + font-weight: bold; +} table.colored tr.headerqueued { background: #ee82ee; diff -r 72252f33edd1 -r 4e2ad77de095 lib/galaxy/webapps/reports/templates/jobs_all_unfinished.mako --- a/lib/galaxy/webapps/reports/templates/jobs_all_unfinished.mako Wed Nov 05 09:28:48 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_all_unfinished.mako Wed Nov 05 10:35:06 2008 -0500 @@ -17,6 +17,8 @@ state = job[0] if state == 'new': rowdef = '<tr class="headernew">' + elif state == 'waiting': + rowdef = '<tr class="headerwaiting">' elif state == 'queued': rowdef = '<tr class="headerqueued">' elif state == 'running': diff -r 72252f33edd1 -r 4e2ad77de095 lib/galaxy/webapps/reports/templates/jobs_per_month_in_error.mako --- a/lib/galaxy/webapps/reports/templates/jobs_per_month_in_error.mako Wed Nov 05 09:28:48 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_per_month_in_error.mako Wed Nov 05 10:35:06 2008 -0500 @@ -2,7 +2,7 @@ <%def name="main_body()"> <div class="reportBody"> - <h3 align="center">Jobs In Error Per Month</h3> + <h3 align="center">Jobs In Error Per Month ( includes jobs deleted before finishing )</h3> <h4 align="center">Click Month to view the number of jobs in error for each day of that month</h4> %if msg: <table align="center" width="70%" class="border" cellpadding="5" cellspacing="5"> diff -r 72252f33edd1 -r 4e2ad77de095 lib/galaxy/webapps/reports/templates/jobs_specified_date_all.mako --- a/lib/galaxy/webapps/reports/templates/jobs_specified_date_all.mako Wed Nov 05 09:28:48 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_specified_date_all.mako Wed Nov 05 10:35:06 2008 -0500 @@ -17,11 +17,15 @@ state = job[0] if state == 'new': rowdef = '<tr class="headernew">' + elif state == 'waiting': + rowdef = '<tr class="headerwaiting">' elif state == 'queued': rowdef = '<tr class="headerqueued">' elif state == 'running': rowdef = '<tr class="headerrunning">' elif state == 'error': + rowdef = '<tr class="headererror">' + elif state == 'deleted': rowdef = '<tr class="headererror">' elif state == 'ok': rowdef = '<tr class="headerok">' diff -r 72252f33edd1 -r 4e2ad77de095 lib/galaxy/webapps/reports/templates/jobs_specified_date_in_error.mako --- a/lib/galaxy/webapps/reports/templates/jobs_specified_date_in_error.mako Wed Nov 05 09:28:48 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_specified_date_in_error.mako Wed Nov 05 10:35:06 2008 -0500 @@ -2,7 +2,7 @@ <%def name="main_body()"> <div class="reportBody"> - <h3 align="center">All Jobs in Error for ${day_label}, ${month_label} ${day_of_month}, ${year_label}</h3> + <h3 align="center">All Jobs in Error for ${day_label}, ${month_label} ${day_of_month}, ${year_label} ( includes jobs deleted before finishing )</h3> %if msg: <table align="center" width="70%" class="border" cellpadding="5" cellspacing="5"> <tr><td class="ok_bgr">${msg}</td></tr> diff -r 72252f33edd1 -r 4e2ad77de095 lib/galaxy/webapps/reports/templates/jobs_specified_month_in_error.mako --- a/lib/galaxy/webapps/reports/templates/jobs_specified_month_in_error.mako Wed Nov 05 09:28:48 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_specified_month_in_error.mako Wed Nov 05 10:35:06 2008 -0500 @@ -2,7 +2,7 @@ <%def name="main_body()"> <div class="reportBody"> - <h3 align="center">Jobs in Error for ${month_label} ${year_label}</h3> + <h3 align="center">Jobs in Error for ${month_label} ${year_label} ( includes jobs deleted before finishing )</h3> <h4 align="center">Click Jobs in Error to view jobs in error for that day</h4> %if msg: <table align="center" width="70%" class="border" cellpadding="5" cellspacing="5"> diff -r 72252f33edd1 -r 4e2ad77de095 lib/galaxy/webapps/reports/templates/jobs_tool_for_month.mako --- a/lib/galaxy/webapps/reports/templates/jobs_tool_for_month.mako Wed Nov 05 09:28:48 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_tool_for_month.mako Wed Nov 05 10:35:06 2008 -0500 @@ -17,11 +17,15 @@ state = job[0] if state == 'new': rowdef = '<tr class="headernew">' + elif state == 'waiting': + rowdef = '<tr class="headerwaiting">' elif state == 'queued': rowdef = '<tr class="headerqueued">' elif state == 'running': rowdef = '<tr class="headerrunning">' elif state == 'error': + rowdef = '<tr class="headererror">' + elif state == 'deleted': rowdef = '<tr class="headererror">' elif state == 'ok': rowdef = '<tr class="headerok">' diff -r 72252f33edd1 -r 4e2ad77de095 lib/galaxy/webapps/reports/templates/jobs_user_for_month.mako --- a/lib/galaxy/webapps/reports/templates/jobs_user_for_month.mako Wed Nov 05 09:28:48 2008 -0500 +++ b/lib/galaxy/webapps/reports/templates/jobs_user_for_month.mako Wed Nov 05 10:35:06 2008 -0500 @@ -17,11 +17,15 @@ state = job[0] if state == 'new': rowdef = '<tr class="headernew">' + elif state == 'waiting': + rowdef = '<tr class="headerwaiting">' elif state == 'queued': rowdef = '<tr class="headerqueued">' elif state == 'running': rowdef = '<tr class="headerrunning">' elif state == 'error': + rowdef = '<tr class="headererror">' + elif state == 'deleted': rowdef = '<tr class="headererror">' elif state == 'ok': rowdef = '<tr class="headerok">'