We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0bf429 commit 3b084cbCopy full SHA for 3b084cb
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:passport", timeout=60 * 60 * 24):
10
+ super().handle(self, *args, **options)
11
+ print("migrate completed...")
rootfs/bin/boot
@@ -24,7 +24,7 @@ python /workspace/manage.py healthchecks
24
25
echo ""
26
echo "Database Migrations:"
27
-python /workspace/manage.py migrate --noinput
+python /workspace/manage.py cluster_migrate --noinput
28
29
30
echo "Collect static files in a single location:"
0 commit comments