whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 6f0a584: keep committee info fresh
Date Tue, 16 Feb 2016 02:58:39 GMT
Commit 6f0a584edda456da056cd1efa0c8aae6925fcbfb:
    keep committee info fresh


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
lib/whimsy/asf/committee.rb                                  | ++ --
www/roster/models/committee.rb                               | ++ --
------------------------------------------------------------
8 changes: 4 additions, 4 deletions.
------------------------------------------------------------


diff --git a/lib/whimsy/asf/committee.rb b/lib/whimsy/asf/committee.rb
index 06e676b..46faa81 100644
--- a/lib/whimsy/asf/committee.rb
+++ b/lib/whimsy/asf/committee.rb
@@ -48,12 +48,12 @@ def self.load_committee_info
       file = "#{board}/committee-info.txt"
       return unless File.exist? file
 
-      list = Hash.new {|hash, name| hash[name] = find(name)}
-
       if @committee_info and File.mtime(file) == @committee_mtime
         return @committee_info 
       end
 
+      list = Hash.new {|hash, name| hash[name] = find(name)}
+
       @committee_mtime = File.mtime(file)
       @@svn_change = Time.parse(
         `svn info #{file}`[/Last Changed Date: (.*) \(/, 1]).gmtime
diff --git a/www/roster/models/committee.rb b/www/roster/models/committee.rb
index ca3b3ce..edbab0a 100644
--- a/www/roster/models/committee.rb
+++ b/www/roster/models/committee.rb
@@ -1,4 +1,3 @@
-ASF::Committee.load_committee_info
 
 class Committee
   def self.serialize(id)
@@ -7,7 +6,8 @@ def self.serialize(id)
     pmc = ASF::Committee.find(id)
     committers = ASF::Group.find(id).members
 
-    ASF::Person.preload('cn', (pmc.members + committers).uniq)
+    ASF::Committee.load_committee_info
+    people = ASF::Person.preload('cn', (pmc.members + committers).uniq)
 
     response = {
       id: id,

Mime
View raw message