Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

fixed #13; commbined load_study.psp and check_job_status.psp #499

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion www/check_job_status.psp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%
__author__ = "Jesse Stombaugh"
__copyright__ = "Copyright 2009-2010, Qiime Web Analysis"
__credits__ = ["Doug Wendel"]
__credits__ = ["Doug Wendel", "Zhenjiang Xu"]
__license__ = "GPL"
__version__ = "1.0.0.dev"
__maintainer__ = ["Doug Wendel"]
Expand Down Expand Up @@ -40,7 +40,34 @@ else:
raise('Could not determine job identifier. study_id and meta_analysis_id are both empty.')

job_type_ids = form['job_type_id'].split(',')
# queued_data_load = form['queued_data_load']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will probably fail with a key error if it doesn't exist?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a comment line

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it is. hehe! I think I need a vacation...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:-D

On Thu, Aug 15, 2013 at 3:17 PM, Doug Wendel notifications@github.comwrote:

In www/check_job_status.psp:

@@ -40,7 +40,34 @@ else:
raise('Could not determine job identifier. study_id and meta_analysis_id are both empty.')

job_type_ids = form['job_type_id'].split(',')
+# queued_data_load = form['queued_data_load']

So it is. hehe! I think I need a vacation...


Reply to this email directly or view it on GitHubhttps://github.com//pull/499/files#r5801572
.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's commented old/broken/unused code, it should be deleted


if 'queued_data_load' in form:
jobs_3 = data_access.getJobInfo(study_id, 3)
ready = True
if jobs_3:
for job in jobs_3:
if job['job_state_name'] != 'COMPLETED_OKAY':
# if any job of preprocess is not finished with ok
ready = False
break
else: ready = False
if ready:
link = '<a href="update_job_status.psp?job_type_id=12">(submit all jobs)</a>'
for job in data_access.getJobInfo(study_id, 12):
if job['job_state_name'] in ['COMPLETED_OKAY', 'COMPLETING',
'QUEUED', 'NEW', 'RUNNING', 'EXITING']:
# not allowing submit jobs for these statuses
link = ''
break
#
%>
<li> Queued Data to Load <%=link%>
<ul>
<div>

<%
#
for jobid in job_type_ids:
#req.write('<p/>looking up jobs<p/>')
jobs = data_access.getJobInfo(job_locator_id, int(jobid))
Expand All @@ -54,5 +81,12 @@ for jobid in job_type_ids:
req.write(display_text)
if job['job_notes'] != None:
req.write('<br/>Output: ' + job['job_notes'])
if 'queued_data_load' in form:
#
%>
</div>
</ul>
</li>
<%
#
%>
34 changes: 1 addition & 33 deletions www/js/jobs.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -35,37 +35,6 @@ function GetXmlHttpObject()
return null;
}

function submitAllJobs()
{
// check if browser can perform xmlhttp
xmlhttp = GetXmlHttpObject()
if (xmlhttp==null)
{
alert ("Your browser does not support XML HTTP Request");
return;
}

var span_name ="submit_all_span";
var url = "load_study.psp";

xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4)
{
try
{
document.getElementById(span_name).innerHTML = xmlhttp.responseText;
}
catch(e)
{
// Do nothing
}
}
}
// perform a GET
xmlhttp.open("GET", url, true);
xmlhttp.send(null);
}

function checkQiimeJobLoadStatus()
{
Expand All @@ -78,7 +47,7 @@ function checkQiimeJobLoadStatus()
}

div_name ="qiime_load_status_div";
var url = "check_job_status.psp?job_type_id=12,15";
var url = "check_job_status.psp?job_type_id=12&queued_data_load";

xmlhttp.onreadystatechange=function()
{
Expand Down Expand Up @@ -286,7 +255,6 @@ function checkAllStudyJobs()
setTimeout(checkQiimeJobStatus, 0);
setTimeout(checkQiimeJobLoadStatus, 1000);
setTimeout(checkEBISRAJobStatus, 2000);
setTimeout(submitAllJobs, 3000);
}

function confirmFormSubmission(confirm_message, form_name)
Expand Down
38 changes: 0 additions & 38 deletions www/load_study.psp

This file was deleted.

19 changes: 2 additions & 17 deletions www/select_study_task.psp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ if portal_type in ['qiime', 'emp']:
</div>
</ul>
</li>
<br/>

<%
elif metadata_complete == 'y' and sff_complete == 'y' and web_app_user_id in approved_qiime_submitters:
if sess["form"].has_key("message"):
Expand Down Expand Up @@ -266,27 +266,12 @@ if portal_type in ['qiime', 'emp']:
<li>Submit Job to Qiime (complete sequence and metadata upload first)</li>
<%
if is_admin == 1:
#jobs = data_access.getJobInfo(study_id, 12)
# Jobs refers to qiime submission jobs. If this is populated, activate this
# div and watch for loading jobs to appear
if len(jobs) > 0:
# indent
%>
<li>
Queued Data to Load
<span id="submit_all_span"> </span>
<ul>
<div id="qiime_load_status_div">
Checking status...
</div>
</ul>
<br/>
<div id="qiime_load_status_div"> </div>
<%
# End if
%>
</li>

<%

# End if

Expand Down