Skip to content

Commit

Permalink
(#2995) Show Job IDs in table
Browse files Browse the repository at this point in the history
  • Loading branch information
squaregoldfish committed Jan 2, 2025
1 parent 1f73428 commit 4198f6b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions WebApp/WebContent/job/job_list.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@
<div class="sectionContent">
<h:form id="jobListForm" method="post" accept-charset="utf8">
<p:dataTable id="jobList" var="job" value="#{jobsBean.jobList}">
<p:column>
<f:facet name="header">
ID
</f:facet>
#{job.id}
</p:column>
<p:column>
<f:facet name="header">
Owner
Expand Down
2 changes: 1 addition & 1 deletion WebApp/src/uk/ac/exeter/QuinCe/jobs/Job.java
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ protected void logError(Throwable error)
*
* @return The job ID.
*/
public long getID() {
public long getId() {
return id;
}

Expand Down
2 changes: 1 addition & 1 deletion WebApp/src/uk/ac/exeter/QuinCe/jobs/JobManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ public static boolean startNextJob(ResourceManager resourceManager,
// Wait until the job's status is updated in the database
boolean jobRunning = false;
while (!jobRunning) {
if (!getJobStatus(resourceManager.getDBDataSource(), nextJob.getID())
if (!getJobStatus(resourceManager.getDBDataSource(), nextJob.getId())
.equals(Job.WAITING_STATUS)) {
jobRunning = true;
} else {
Expand Down
4 changes: 2 additions & 2 deletions WebApp/src/uk/ac/exeter/QuinCe/jobs/JobThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected boolean isOverflowThread() {
*/
public void run() {
try {
setName(String.valueOf(job.getID()) + '_' + System.currentTimeMillis());
setName(String.valueOf(job.getId()) + '_' + System.currentTimeMillis());

while (null != job) {

Expand Down Expand Up @@ -132,7 +132,7 @@ public void run() {
if (null != cause) {
if (StringUtils.stackTraceToString(cause).contains("Deadlock")) {
JobManager.setStatus(
ResourceManager.getInstance().getDBDataSource(), job.getID(),
ResourceManager.getInstance().getDBDataSource(), job.getId(),
Job.WAITING_STATUS);
}
}
Expand Down

0 comments on commit 4198f6b

Please sign in to comment.