summaryrefslogtreecommitdiffstats
path: root/apps/files/js/files.js
diff options
context:
space:
mode:
authorTomasz Grobelny <tomasz@grobelny.net>2019-01-27 22:59:14 +0100
committerTomasz Grobelny <tomasz@grobelny.net>2019-01-27 22:59:14 +0100
commitf99ce0d546c8332bb46807eed21fcdf7d5d0ab71 (patch)
tree3e50871e6fb513ee393c37fec48da2f9c11806ed /apps/files/js/files.js
parent996bad61b78b07f241b3b26c0fc98134ea8ab9f7 (diff)
downloadnextcloud-server-f99ce0d546c8332bb46807eed21fcdf7d5d0ab71.tar.gz
nextcloud-server-f99ce0d546c8332bb46807eed21fcdf7d5d0ab71.zip
Throttle getstoragestats.php calls and allow simultaneous uploads
Signed-off-by: Tomasz Grobelny <tomasz@grobelny.net>
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r--apps/files/js/files.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 016aef05a96..a785a44ddd6 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -33,6 +33,9 @@
},
// update quota
updateStorageQuotas: function() {
+ Files._updateStorageQuotasThrottled();
+ },
+ _updateStorageQuotas: function() {
var state = Files.updateStorageQuotas;
state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php'),function(response) {
Files.updateQuota(response);
@@ -356,6 +359,7 @@
};
Files._updateStorageStatisticsDebounced = _.debounce(Files._updateStorageStatistics, 250);
+ Files._updateStorageQuotasThrottled = _.throttle(Files._updateStorageQuotas, 30000);
OCA.Files.Files = Files;
})();