We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a757e6 commit 7f7a7deCopy full SHA for 7f7a7de
2 files changed
rootfs/api/management/commands/cluster_migrate.py
@@ -0,0 +1,11 @@
1
+from django.core.cache import cache
2
+from django.core.management.commands import migrate
3
+
4
5
+class Command(migrate.Command):
6
+ """Management command for cluster_lock"""
7
+ def handle(self, *args, **options):
8
+ print("preparing migrate...")
9
+ with cache.lock("drycc:controller", timeout=60 * 60 * 24):
10
+ super().handle(self, *args, **options)
11
+ print("migrate completed...")
rootfs/bin/boot
@@ -25,7 +25,7 @@ python /workspace/manage.py healthchecks
25
26
echo ""
27
echo "Database Migrations:"
28
-python /workspace/manage.py migrate --noinput
+python /workspace/manage.py cluster_migrate --noinput
29
30
# spawn a gunicorn server in the background
31
0 commit comments