From 49cd7a1da84c11f24b64ac9c7eac55b5f6176580 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 30 Aug 2024 11:28:23 -0700 Subject: [PATCH] Comment out entire body of doJob() to assess bottleneck --- .../portal/domain/admin/DailyAdminJob.java | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main/java/org/wise/portal/domain/admin/DailyAdminJob.java b/src/main/java/org/wise/portal/domain/admin/DailyAdminJob.java index f7de267cd..1494296c4 100644 --- a/src/main/java/org/wise/portal/domain/admin/DailyAdminJob.java +++ b/src/main/java/org/wise/portal/domain/admin/DailyAdminJob.java @@ -126,36 +126,36 @@ public class DailyAdminJob { @Scheduled(cron = "0 0 0 * * ?") public void doJob() { // query for the portal statistics and save a new row in the portalStatistics table - gatherPortalStatistics(); + // gatherPortalStatistics(); // query the vle tables and save a new row in the vleStatistics table // too process-intensive, also, looking at out-of-date tables (e.g. studentData) // gatherVLEStatistics(); // create and send a message to uber_admin - String messageBody = getSummaryMessage(); - sendEmail(messageBody); + // String messageBody = getSummaryMessage(); + // sendEmail(messageBody); // post statistics to hub if allowed - try { - Portal portal = portalService.getById(1); - if (portal.isSendStatisticsToHub()) { - try { - JSONObject wiseStatisticsJSONObject = new JSONObject(); - wiseStatisticsJSONObject.put("wiseName", appProperties.getProperty("wise.name")); - - PortalStatistics latestPortalStatistics = portalStatisticsService - .getLatestPortalStatistics(); - wiseStatisticsJSONObject.put("portal", latestPortalStatistics.getJSONObject()); - postStatistics(wiseStatisticsJSONObject.toString()); - } catch (JSONException e) { - e.printStackTrace(); - } - - } - } catch (ObjectNotFoundException e) { - // do nothing - } + // try { + // Portal portal = portalService.getById(1); + // if (portal.isSendStatisticsToHub()) { + // try { + // JSONObject wiseStatisticsJSONObject = new JSONObject(); + // wiseStatisticsJSONObject.put("wiseName", appProperties.getProperty("wise.name")); + + // PortalStatistics latestPortalStatistics = portalStatisticsService + // .getLatestPortalStatistics(); + // wiseStatisticsJSONObject.put("portal", latestPortalStatistics.getJSONObject()); + // postStatistics(wiseStatisticsJSONObject.toString()); + // } catch (JSONException e) { + // e.printStackTrace(); + // } + + // } + // } catch (ObjectNotFoundException e) { + // // do nothing + // } } /**