From 17bd609ca47cdee147c24ab565e2e062b004c003 Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Sun, 6 Jan 2019 21:04:04 +0100
Subject: [PATCH] Move Celery broker url details to secrets

---
 SciPost_v1/settings/base.py           | 2 +-
 SciPost_v1/settings/production.py     | 4 ++--
 scipost/templates/scipost/sitemap.xml | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/SciPost_v1/settings/base.py b/SciPost_v1/settings/base.py
index 00639b58c..eb4f73096 100644
--- a/SciPost_v1/settings/base.py
+++ b/SciPost_v1/settings/base.py
@@ -379,7 +379,7 @@ LOGGING = {
 
 # Celery scheduled tasks
 CELERY_RESULT_BACKEND = 'django-db'
-CELERY_BROKER_URL = 'amqp://guest:guest@localhost:17483//'
+CELERY_BROKER_URL = 'amqp://guest:guest@localhost:5672//'
 CELERY_IMPORTS = ('submissions.tasks', )
 
 
diff --git a/SciPost_v1/settings/production.py b/SciPost_v1/settings/production.py
index b29857897..ef15b9019 100644
--- a/SciPost_v1/settings/production.py
+++ b/SciPost_v1/settings/production.py
@@ -54,5 +54,5 @@ ITHENTICATE_PASSWORD = get_secret('ITHENTICATE_PASSWORD')
 LOGGING['handlers']['scipost_file_arxiv']['filename'] = '/home/scipost/webapps/scipost/logs/arxiv.log'
 LOGGING['handlers']['scipost_file_doi']['filename'] = '/home/scipost/webapps/scipost/logs/doi.log'
 
-
-#BROKER_URL = 'amqp://guest:guest@localhost:5672//'
+# Celery scheduled tasks
+CELERY_BROKER_URL = get_secret('CELERY_BROKER_URL')
diff --git a/scipost/templates/scipost/sitemap.xml b/scipost/templates/scipost/sitemap.xml
index 98d2c9a4e..0756cad4d 100644
--- a/scipost/templates/scipost/sitemap.xml
+++ b/scipost/templates/scipost/sitemap.xml
@@ -6,7 +6,7 @@
   <url><loc>https://scipost.org/finances/subsidies</loc></url>
 
   {% for newsitem in newsitems %}
-  <url><loc>https://scipost.org{{ newsitem.get_absolute_url }}</locL</url>
+  <url><loc>https://scipost.org{{ newsitem.get_absolute_url }}>/locL>/url>
   {% endfor %}
 
   {% for journal in journals %}
-- 
GitLab