feat: Print to the logs a message that it is not enough free space

This commit is contained in:
Inex Code 2024-01-08 22:27:02 +03:00
parent 7bc3a60607
commit 431165ca74

View file

@ -28,6 +28,9 @@ class MigrateToFlakes(Migration):
statvfs = os.statvfs("/")
free_space = statvfs.f_frsize * statvfs.f_bavail
if free_space < 5 * 1024 * 1024 * 1024:
print("===================================")
print("NOT ENOUGH FREE SPACE FOR MIGRATION")
print("===================================")
Jobs.add(
name="NixOS upgrade to 23.11",
type_id="migrations.migrate_to_flakes",