From 64d78897e44087e3b7f1086a538b96d24f800c19 Mon Sep 17 00:00:00 2001 From: Steve Jones Date: Thu, 2 Jan 2025 16:19:21 +0100 Subject: [PATCH] (#2995) Show Job IDs in table --- WebApp/WebContent/job/job_list.xhtml | 6 ++++++ WebApp/src/uk/ac/exeter/QuinCe/jobs/Job.java | 2 +- WebApp/src/uk/ac/exeter/QuinCe/jobs/JobManager.java | 2 +- WebApp/src/uk/ac/exeter/QuinCe/jobs/JobThread.java | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/WebApp/WebContent/job/job_list.xhtml b/WebApp/WebContent/job/job_list.xhtml index 6af28e3f4..db29236f8 100644 --- a/WebApp/WebContent/job/job_list.xhtml +++ b/WebApp/WebContent/job/job_list.xhtml @@ -106,6 +106,12 @@
+ + + ID + + #{job.id} + Owner diff --git a/WebApp/src/uk/ac/exeter/QuinCe/jobs/Job.java b/WebApp/src/uk/ac/exeter/QuinCe/jobs/Job.java index 10d95eccc..1fc9ac30e 100644 --- a/WebApp/src/uk/ac/exeter/QuinCe/jobs/Job.java +++ b/WebApp/src/uk/ac/exeter/QuinCe/jobs/Job.java @@ -313,7 +313,7 @@ protected void logError(Throwable error) * * @return The job ID. */ - public long getID() { + public long getId() { return id; } diff --git a/WebApp/src/uk/ac/exeter/QuinCe/jobs/JobManager.java b/WebApp/src/uk/ac/exeter/QuinCe/jobs/JobManager.java index e1de8468c..94396a609 100644 --- a/WebApp/src/uk/ac/exeter/QuinCe/jobs/JobManager.java +++ b/WebApp/src/uk/ac/exeter/QuinCe/jobs/JobManager.java @@ -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 { diff --git a/WebApp/src/uk/ac/exeter/QuinCe/jobs/JobThread.java b/WebApp/src/uk/ac/exeter/QuinCe/jobs/JobThread.java index 0bd307966..6fced547c 100644 --- a/WebApp/src/uk/ac/exeter/QuinCe/jobs/JobThread.java +++ b/WebApp/src/uk/ac/exeter/QuinCe/jobs/JobThread.java @@ -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) { @@ -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); } }