13593: Changes default async permission update interval. Clears cache.
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Tue, 12 Mar 2019 14:38:09 +0000 (11:38 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Tue, 12 Mar 2019 14:38:09 +0000 (11:38 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

doc/api/methods/groups.html.textile.liquid
services/api/config/application.default.yml
services/api/lib/refresh_permission_view.rb

index ed74f81d152f5bbdeb03343f4d3e5b785b308cff..9c75fa8ec7aec59d9ffea144cbf67d9a6caae7b0 100644 (file)
@@ -68,7 +68,7 @@ Arguments:
 table(table table-bordered table-condensed).
 |_. Argument |_. Type |_. Description |_. Location |_. Example |
 |group|object||query||
-|async|boolean (default false)|Defer the permissions graph update by a configured number of seconds. (By default, @async_permissions_update_interval@ is 60 seconds). On success, the response is 202 (Accepted).|query|@true@|
+|async|boolean (default false)|Defer the permissions graph update by a configured number of seconds. (By default, @async_permissions_update_interval@ is 20 seconds). On success, the response is 202 (Accepted).|query|@true@|
 
 h3. delete
 
@@ -116,7 +116,7 @@ table(table table-bordered table-condensed).
 |_. Argument |_. Type |_. Description |_. Location |_. Example |
 {background:#ccffcc}.|uuid|string|The UUID of the Group in question.|path||
 |group|object||query||
-|async|boolean (default false)|Defer the permissions graph update by a configured number of seconds. (By default, @async_permissions_update_interval@ is 60 seconds). On success, the response is 202 (Accepted).|query|@true@|
+|async|boolean (default false)|Defer the permissions graph update by a configured number of seconds. (By default, @async_permissions_update_interval@ is 20 seconds). On success, the response is 202 (Accepted).|query|@true@|
 
 h3. untrash
 
index 0d44ef4471f0b9b135d0b7e2a33a5a698cf203ee..b7520228242685f9968891b900fe98d4cef28b1b 100644 (file)
@@ -192,7 +192,7 @@ common:
   # Interval (seconds) between asynchronous permission view updates. Any
   # permission-updating API called with the 'async' parameter schedules a an
   # update on the permission view in the future, if not already scheduled.
-  async_permissions_update_interval: 60
+  async_permissions_update_interval: 20
 
   # Maximum characters of (JSON-encoded) query parameters to include
   # in each request log entry. When params exceed this size, they will
index cfd7b6ae59ce00239450f8014671de3bccce9c90..f3e1ed6a4575e44c78d707e55610e7f8a384b9ba 100644 (file)
@@ -20,6 +20,7 @@ def refresh_permission_view(async=false)
         Thread.current.abort_on_exception = false
         begin
           sleep(exp)
+          Rails.cache.delete('AsyncRefreshPermissionView')
           do_refresh_permission_view
         rescue => e
           Rails.logger.error "Updating permission view: #{e}\n#{e.backtrace.join("\n\t")}"