From: <cl...@vh...> - 2005-11-08 16:00:38
|
Author: clasohm Date: 2005-11-08 16:59:26 +0100 (Tue, 08 Nov 2005) New Revision: 981 Modified: trunk/ccm-ldn-theme/src/com/arsdigita/london/theme/util/ThemeFileManager.java Log: fixed update of m_lastRunDate, to prevent ThemePublishedFileManager.updateTheme() from skipping themes Modified: trunk/ccm-ldn-theme/src/com/arsdigita/london/theme/util/ThemeFileManager.java =================================================================== --- trunk/ccm-ldn-theme/src/com/arsdigita/london/theme/util/ThemeFileManager.java 2005-11-08 14:38:05 UTC (rev 980) +++ trunk/ccm-ldn-theme/src/com/arsdigita/london/theme/util/ThemeFileManager.java 2005-11-08 15:59:26 UTC (rev 981) @@ -119,6 +119,13 @@ s_log.info("Polling file every " + m_pollDelay + "s."); while ( (sleepSeconds(m_pollDelay) || m_ignoreInterrupt) && m_keepWatchingFiles ) { + // Get the last run date before we do anything, + // so we can be sure that we do not miss any themes + // published while we run. But only store it after + // we have processed all themes, because it will be + // used in ThemePublishedFileManager.updateTheme(). + Date lastRunDate = new Date(); + TransactionContext txn = SessionManager.getSession().getTransactionContext(); @@ -135,6 +142,8 @@ if (startedTransaction) { txn.commitTxn(); } + + m_lastRunDate = lastRunDate; } catch (Exception e) { s_log.warn("Ignoring uncaught exception", e); } finally { @@ -284,7 +293,6 @@ } } } - m_lastRunDate = new Date(); } |