Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
use StorageAdapter#size to reduce IO
Browse files Browse the repository at this point in the history
  • Loading branch information
littleskunk committed Mar 10, 2017
1 parent de22d1e commit b3d9db7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
{
"name": "Gordon Hall",
"email": "gordon@storj.io"
},
{
"name": "littleskunk",
"url": "https://github.com/littleskunk"
}
],
"license": "AGPL-3.0",
Expand Down
2 changes: 1 addition & 1 deletion script/farmer.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function sendFarmerState() {
}

function updatePercentUsed() {
utils.getDirectorySize(config.storagePath, (err, result) => {
config.storageManager._storage.size((err, result) => {
if (result) {
farmerState.spaceUsed = bytes(result);
farmerState.percentUsed = ((result / spaceAllocation) * 100).toFixed();
Expand Down

0 comments on commit b3d9db7

Please sign in to comment.