Commits

Anonymous committed c12a006

Support querying of the "local-state-refresh-interval" by the egg user.

Signed-off-by: Andy Bennett <andyjpb@knodium.com>

  • Participants
  • Parent commits d4cc054

Comments (0)

Files changed (1)

 	  metadata-cache-table
 	  table-scope
 	  db-state-change-callback
+	  local-state-refresh-interval
 	  update-local-state!
 	  add-account-info!
 	  ls
 (define account-info-table   (make-parameter #f))
 (define metadata-cache-table (make-parameter #f))
 (define db-state-change-callback (make-parameter #f))
+(define local-state-refresh-interval (* 5 60))
 
 
 ; https://www.dropbox.com/developers/reference/api#date-format
 	(if (and
 	      (= 1 accounts)
 	      (or
-		(> (- now account-info-last-complete) (* 5 60))
+		(> (- now account-info-last-complete) local-state-refresh-interval)
 		force-account-info))
 	  (update-account-info! account-info))
 	(if (or
 	      (< metadata-cache-last-complete metadata-cache-last-modified) ; we know the metadata is not complete
-	      (> (- now metadata-cache-last-complete) (* 5 60)) ; or we last checked it more than five minutes ago
+	      (> (- now metadata-cache-last-complete) local-state-refresh-interval) ; or we last checked it more than five minutes ago
 	      force-metadata)
 	  (update-metadata! cursor))
 	#t)