diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableGenerator.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableGenerator.java index 777c67382b6d..4d0d1dbf4f4f 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableGenerator.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/table/DefaultAnalyticsTableGenerator.java @@ -149,8 +149,6 @@ public void generateResourceTables(JobProgress progress) { // ------------------------------------------------------------------------- private void generateResourceTablesInternal(JobProgress progress) { - final Date startTime = new Date(); - resourceTableService.dropAllSqlViews(progress); Map generators = new LinkedHashMap<>(); @@ -184,6 +182,6 @@ private void generateResourceTablesInternal(JobProgress progress) { resourceTableService.createAllSqlViews(progress); systemSettingManager.saveSystemSetting( - SettingKey.LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE, startTime); + SettingKey.LAST_SUCCESSFUL_RESOURCE_TABLES_UPDATE, new Date()); } }