mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 03:53:44 +08:00
16 lines
348 B
Ruby
16 lines
348 B
Ruby
|
Report.add_report("storage_stats") do |report|
|
||
|
backup_stats = begin
|
||
|
BackupRestore::BackupStore.create.stats
|
||
|
rescue BackupRestore::BackupStore::StorageError
|
||
|
nil
|
||
|
end
|
||
|
|
||
|
report.data = {
|
||
|
backups: backup_stats,
|
||
|
uploads: {
|
||
|
used_bytes: DiskSpace.uploads_used_bytes,
|
||
|
free_bytes: DiskSpace.uploads_free_bytes
|
||
|
}
|
||
|
}
|
||
|
end
|