File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ def zabbix_collect_used_disk(task):
3535 )
3636
3737 for database in Database .objects .filter (environment = environment ):
38+ database_resized = False
3839 task .add_detail (
3940 message = 'Database: {}' .format (database .name ), level = 1
4041 )
@@ -91,13 +92,16 @@ def zabbix_collect_used_disk(task):
9192 message = 'Zabbix metrics not updated' , level = 4
9293 )
9394
94- if current_percentage >= threshold_disk_resize and database .disk_auto_resize :
95+ if current_percentage >= threshold_disk_resize and \
96+ database .disk_auto_resize and \
97+ not database_resized :
9598 try :
9699 task_resize = disk_auto_resize (
97100 database = database ,
98101 current_size = current_size ,
99102 usage_percentage = current_percentage
100103 )
104+ database_resized = True
101105 except Exception as e :
102106 problems += 1
103107 status = TaskHistory .STATUS_WARNING
You can’t perform that action at this time.
0 commit comments