mirror of
https://github.com/makeplane/plane.git
synced 2026-07-12 05:21:14 +02:00
chore: clear workspace license on restart (#939)
This commit is contained in:
@@ -33,4 +33,7 @@ python manage.py create_bucket
|
||||
# Clear Cache before starting to remove stale values
|
||||
python manage.py clear_cache
|
||||
|
||||
# Clear workspace licenses
|
||||
python manage.py clear_workspace_licenses
|
||||
|
||||
exec gunicorn -w "$GUNICORN_WORKERS" -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:"${PORT:-8000}" --max-requests 1200 --max-requests-jitter 1000 --access-logfile -
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Django imports
|
||||
from django.core.management import BaseCommand
|
||||
|
||||
# Module imports
|
||||
from plane.ee.models import WorkspaceLicense
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Clear the workspace licenses on the start up"
|
||||
|
||||
def handle(self, *args, **options):
|
||||
# Clear the workspace licenses
|
||||
WorkspaceLicense.objects.all().delete()
|
||||
self.stdout.write(
|
||||
self.style.SUCCESS("Workspace licenses cleared successfully")
|
||||
)
|
||||
return
|
||||
Reference in New Issue
Block a user