Install django-rq and use it to ping WebSub, rather than blocking the micropub request during pings

This commit is contained in:
Danielle McLean 2017-11-06 11:04:22 +11:00
parent 382b7ee4a9
commit e853e22362
Signed by untrusted user: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
6 changed files with 81 additions and 47 deletions

View file

@ -77,6 +77,7 @@ INSTALLED_APPS = [
'django_agent_trust',
'django_otp',
'django_otp.plugins.otp_totp',
'django_rq',
'favicon',
'meta',
'shorturls',
@ -228,3 +229,7 @@ META_USE_TWITTER_PROPERTIES = True
# django-push
# https://django-push.readthedocs.io/en/latest/publisher.html
PUSH_HUB = 'https://00dani.superfeedr.com/'
# django-rq
# https://github.com/ui/django-rq
RQ_QUEUES = {'default': {'USE_REDIS_CACHE': 'default'}}

View file

@ -42,6 +42,7 @@ urlpatterns = [
url('^micropub', include('micropub.urls')),
url('^s/', include('shorturls.urls')),
url(r'^django-rq/', include('django_rq.urls')),
url(r'^sitemap\.xml$', sitemap.index, maps, name='sitemap'),
url(r'^sitemaps/(?P<section>.+)\.xml$', sitemap.sitemap, maps,
name='django.contrib.sitemaps.views.sitemap'),