-
Notifications
You must be signed in to change notification settings - Fork 2
Guide_Getting started without celery
Michael Beaton edited this page Dec 22, 2022
·
3 revisions
Install django-wm
from PyPI:
pip install django-wm
python manage.py migrate
In your project settings.py
file add a new line with:
WEBMENTIONS_USE_CELERY = False
Run manage.py pending_migrations
to batch-process any pending Webmentions.
Processing a webmention requires a number of network calls to the other (sending/receiving) server, any of which might have errors or take a while to complete. When celery
is disabled, incoming and outgoing Webmentions will store required data in your database so they can be processed separately.
- When you save a model that implements
MentionableMixin
, aPendingOutgoingContent
object will be created. - When an incoming Webmention is received, a
PendingIncomingWebmention
object will be created.
You can then batch-process these using the mentions_pending
management command:
python manage.py mentions_pending
You may want to schedule this to run regularly via something like cron
.
# Run every hour at 27 minutes past.
27 * * * * /path/to/python /path/to/project/manage.py mentions_pending
Go back and follow the rest of the instructions for django-wm