whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: WHIMSY-204 - allow for update window
Date Mon, 10 Sep 2018 23:31:16 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 2424fa1  WHIMSY-204 - allow for update window
2424fa1 is described below

commit 2424fa1a9d49a84718477d9a9d044a8c44d82d55
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Sep 11 00:31:14 2018 +0100

    WHIMSY-204 - allow for update window
---
 tools/collate_minutes.rb | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/tools/collate_minutes.rb b/tools/collate_minutes.rb
index 507e51d..14ab13d 100755
--- a/tools/collate_minutes.rb
+++ b/tools/collate_minutes.rb
@@ -62,7 +62,9 @@ NOSTAMP = ARGV.delete '--nostamp' # don't add dynamic timestamp to pages
(for de
 
 STAMP = (NOSTAMP ? DateTime.new(1970) :  DateTime.now).strftime '%Y-%m-%d %H:%M'
 
-YYYYMMDD = ARGV.first || '20*' # Allow override of minutes to process
+YYYYMMDD = ARGV.shift || '20*' # Allow override of minutes to process
+
+TIME_DIFF = (ARGV.shift || '300').to_i # Allow override of seconds of time diff (WHIMSY-204)
for testing
 
 MINUTES_NAME = "board_minutes_#{YYYYMMDD}.txt"
 MINUTES_PATH = "#{SVN_SITE_RECORDS_MINUTES}/*/#{MINUTES_NAME}"
@@ -79,9 +81,14 @@ if File.exist? INDEX_FILE
     push(File.stat(__FILE__).mtime, ASF.library_mtime).
     max
 
-  if File.stat(INDEX_FILE).mtime >= input
-    Wunderbar.info "All up to date!"
-    # Do not update the index file as its timestamp is used as a marker for the last update
+  indexmtime = File.stat(INDEX_FILE).mtime
+  diff = indexmtime - input
+  Wunderbar.info "Most recent update: #{input}"
+  Wunderbar.info "Index file update:  #{indexmtime} Diff: #{diff}"
+  # WHIMSY-204: allow for update window
+  # TODO: consider storing actual update check time
+  if diff >= TIME_DIFF
+    Wunderbar.info "All up to date! (#{TIME_DIFF})"
     exit unless force
   end
 end


Mime
View raw message