This commit is contained in:
Sam 2015-02-04 21:37:02 +11:00
parent b3b4d390fa
commit aca05267cd

View file

@ -3,13 +3,13 @@ class DiskSpace
extend ActionView::Helpers::NumberHelper extend ActionView::Helpers::NumberHelper
def self.uploads_used_bytes def self.uploads_used_bytes
used(uploads_path) # used(uploads_path)
# temporary (on our internal setup its just too slow to iterate)
Upload.sum(:filesize).to_i
end end
def self.uploads_free_bytes def self.uploads_free_bytes
# temporary (on our internal setup its just too slow) free(uploads_path)
Upload.sum(:filesize).to_i
# free(uploads_path)
end end
def self.backups_used_bytes def self.backups_used_bytes