[ARVADOS] updated: 1.1.4-304-g9b1d344

Git user git at public.curoverse.com
Wed May 23 12:52:41 EDT 2018


Summary of changes:
 sdk/cwl/arvados_cwl/http.py | 5 +++++
 1 file changed, 5 insertions(+)

       via  9b1d3444a6a650887620b20f040b5935c550f4af (commit)
      from  ef66d2fec4bddabfe678f58e5f21a2a8d9471b6f (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 9b1d3444a6a650887620b20f040b5935c550f4af
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Wed May 23 12:52:22 2018 -0400

    11162: Set a default cache time of 24 hours for files fetched over http.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/sdk/cwl/arvados_cwl/http.py b/sdk/cwl/arvados_cwl/http.py
index 064aa8d..af9bf04 100644
--- a/sdk/cwl/arvados_cwl/http.py
+++ b/sdk/cwl/arvados_cwl/http.py
@@ -31,6 +31,11 @@ def fresh_cache(url, properties):
     if expires is None and "Expires" in pr:
         expires = my_parsedate(pr["Expires"])
 
+    if expires is None:
+        # Use a default cache time of 24 hours if upstream didn't set
+        # any cache headers, to reduce redundant downloads.
+        expires = my_parsedate(pr["Date"]) + datetime.timedelta(hours=24)
+
     if not expires:
         return False
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list