freeze period in place #45
+19
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.2.30 on 2026-09-14 14:14
|
||||
|
||||
import datetime
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cloudmanager', '0004_alter_deployment_data_do_not_touch_until'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='deployment_data',
|
||||
name='do_not_touch_until',
|
||||
field=models.DateTimeField(default=datetime.datetime(2026, 9, 14, 14, 14, 29, 566084, tzinfo=datetime.timezone.utc), verbose_name='do_not_touch_until'),
|
||||
),
|
||||
]
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.2.30 on 2026-09-14 14:14
|
||||
|
||||
import datetime
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cloudmanager', '0005_alter_deployment_data_do_not_touch_until'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='deployment_data',
|
||||
name='do_not_touch_until',
|
||||
field=models.DateTimeField(default=datetime.datetime(2026, 9, 14, 14, 14, 33, 642627, tzinfo=datetime.timezone.utc), verbose_name='do_not_touch_until'),
|
||||
),
|
||||
]
|
||||
@@ -1,6 +1,6 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
from django.utils import timezone
|
||||
|
||||
|
||||
class Schedule_Week_Data(models.Model):
|
||||
@@ -55,7 +55,7 @@ class Deployment_Data(models.Model):
|
||||
schedule_day = models.ForeignKey(Schedule_Day_Data,null=True, blank=True, on_delete=models.SET_NULL)
|
||||
replicas = models.IntegerField()
|
||||
actual_replica = models.IntegerField()
|
||||
do_not_touch_until = models.DateTimeField('do_not_touch_until', blank=True, null=True, auto_now_add=True)
|
||||
do_not_touch_until = models.DateTimeField('do_not_touch_until', default=timezone.now())
|
||||
class Meta:
|
||||
db_table = 'machine'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import datetime
|
||||
from django.utils import timezone
|
||||
|
||||
from apps.kubernetes_connection.utils import get_namespace,get_deployments,scale_up,scale_down
|
||||
from apps.cloudmanager.models import Schedule_Day_Data,Schedule_Week_Data,Namespace_Data,Deployment_Data
|
||||
|
||||
Reference in New Issue
Block a user