[ARVADOS] updated: 3aee47f04fddb82b1887044de86f8824e9e2f5f2

Git user git at public.curoverse.com
Wed Jan 11 13:48:38 EST 2017


Summary of changes:
 services/api/config/application.rb | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

       via  3aee47f04fddb82b1887044de86f8824e9e2f5f2 (commit)
      from  b7ff345255551a5187ae7b2846b704a3c800256d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 3aee47f04fddb82b1887044de86f8824e9e2f5f2
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Jan 11 13:48:03 2017 -0500

    10808: Fix crash in cache-ownership-mismatch warning message.
    
    refs #10808

diff --git a/services/api/config/application.rb b/services/api/config/application.rb
index d3fee8e..f3f6424 100644
--- a/services/api/config/application.rb
+++ b/services/api/config/application.rb
@@ -42,9 +42,14 @@ module Server
     # other processes to fail later.
     default_cache_path = Rails.root.join('tmp', 'cache')
     if not File.owned?(default_cache_path)
-      STDERR.puts("Defaulting to memory cache, because #{default_cache_path} " \
-                  "owner (uid=#{File::Stat.new(default_cache_path).uid}) " \
-                  "is not me (uid=#{Process.euid})")
+      if File.exist?(default_cache_path)
+        why = "owner (uid=#{File::Stat.new(default_cache_path).uid}) " +
+          "is not me (uid=#{Process.euid})"
+      else
+        why = "does not exist"
+      end
+      STDERR.puts("Defaulting to memory cache, " +
+                  "because #{default_cache_path} #{why}")
       config.cache_store = :memory_store
     end
   end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list