Remove support for repo updated trigger

This was never actually completed, and we have other ways to deal with
the deployments now that are faster.
This commit is contained in:
Magnus Hagander
2017-06-27 15:14:20 +02:00
parent 7053f08d0a
commit 0354a5ec0f
3 changed files with 0 additions and 14 deletions

View File

@ -285,15 +285,6 @@ def api_varnish_purge(request):
curs.execute("SELECT varnish_purge_expr(%s)", (expr, ))
return HttpResponse("Purged %s entries\n" % n)
@nocache
@csrf_exempt
def api_repo_updated(request):
if not get_client_ip(request) in settings.SITE_UPDATE_HOSTS:
return HttpServerError("Invalid client address")
# Ignore methods and contents, just drop the trigger
open(settings.SITE_UPDATE_TRIGGER_FILE, 'a').close()
return HttpResponse("OK")
# Merge two organisations
@login_required
@user_passes_test(lambda u: u.is_superuser)

View File

@ -171,8 +171,6 @@ FTP_MASTERS=() # A tuple containing the *IP addresses* of all machin
VARNISH_PURGERS=() # Extra servers that can do varnish purges through our queue
ARCHIVES_SEARCH_SERVER="archives.postgresql.org" # Where to post REST request for archives search
FRONTEND_SMTP_RELAY="magus.postgresql.org" # Where to relay user generated email
SITE_UPDATE_TRIGGER_FILE='/tmp/pgweb.update_trigger' # Where to drop update trigger file
SITE_UPDATE_HOSTS=('127.0.0.1', ) # Hosts that can trigger a site update
# Load local settings overrides
from settings_local import *

View File

@ -127,9 +127,6 @@ urlpatterns = patterns('',
# API endpoints
(r'^api/varnish/purge/$', 'pgweb.core.views.api_varnish_purge'),
# Pingback from git repo to update site
(r'^api/repo_updated/$', 'pgweb.core.views.api_repo_updated'),
# Override some URLs in admin, to provide our own pages
(r'^admin/pending/$', 'pgweb.core.views.admin_pending'),
(r'^admin/purge/$', 'pgweb.core.views.admin_purge'),