mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(bug) free disk space not verified in some cases
This commit is contained in:
parent
c3526fc600
commit
a776b9cc6a
@ -1,5 +1,7 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
- Fix a bug: free disk space not verified in some cases
|
||||
|
||||
## v5.5.0 2022 November 08
|
||||
|
||||
- Feature Fablab Store
|
||||
|
@ -10,14 +10,14 @@ class FreeDiskSpaceWorker
|
||||
stat = Sys::Filesystem.stat('.')
|
||||
mb_available = stat.block_size * stat.blocks_available / 1024 / 1024
|
||||
|
||||
return if mb_available > Rails.application.secrets.disk_space_mb_alert
|
||||
return if mb_available > Rails.application.secrets.disk_space_mb_alert.to_i
|
||||
|
||||
NotificationCenter.call type: 'notify_admin_free_disk_space',
|
||||
receiver: User.adminsys || User.admins,
|
||||
attached_object: Role.first,
|
||||
meta_data: {
|
||||
mb_available: mb_available,
|
||||
threshold: Rails.application.secrets.disk_space_mb_alert
|
||||
threshold: Rails.application.secrets.disk_space_mb_alert.to_i
|
||||
}
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user