From b85451fb91c31fec30baa471b718276f4539419b Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Wed, 9 Jan 2019 12:07:44 +0100
Subject: [PATCH] Remove flower

---
 SciPost_v1/settings/base.py |  1 -
 scipost/urls.py             |  1 -
 scipost/views.py            | 10 ----------
 3 files changed, 12 deletions(-)

diff --git a/SciPost_v1/settings/base.py b/SciPost_v1/settings/base.py
index 13797a059..2768b7b47 100644
--- a/SciPost_v1/settings/base.py
+++ b/SciPost_v1/settings/base.py
@@ -381,7 +381,6 @@ LOGGING = {
 CELERY_RESULT_BACKEND = 'django-db'
 CELERY_BROKER_URL = get_secret('CELERY_BROKER_URL')
 CELERY_IMPORTS = ('submissions.tasks', )
-FLOWER_PORT = get_secret('FLOWER_PORT')
 
 
 # Automation.
diff --git a/scipost/urls.py b/scipost/urls.py
index 3475572dd..4e4424965 100644
--- a/scipost/urls.py
+++ b/scipost/urls.py
@@ -19,7 +19,6 @@ JOURNAL_REGEX = '(?P<doi_label>%s)' % REGEX_CHOICES
 
 urlpatterns = [
     url(r'^$', views.index, name='index'),
-    url(r'^flower/', views.flower, name='flower'), # monitor for Celery tasks; su only
     url(r'^files/secure/(?P<path>.*)$', views.protected_serve, name='secure_file'),
 
     # General use pages
diff --git a/scipost/views.py b/scipost/views.py
index bcb1b4c28..efdec24ed 100644
--- a/scipost/views.py
+++ b/scipost/views.py
@@ -129,16 +129,6 @@ def index(request):
     return render(request, 'scipost/index.html', context)
 
 
-def flower(request):
-    """
-    Monitoring pages for the Celery-driven scheduled tasks.
-    This view is accessible to superusers only.
-    """
-    if not request.user.is_authenticated or not request.user.is_superuser:
-        raise Http404
-    return redirect('https://localhost:%s' % settings.FLOWER_PORT)
-
-
 def protected_serve(request, path, show_indexes=False):
     """
     Serve media files from outside the public MEDIA_ROOT folder.
-- 
GitLab