Repository navigation
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 migrateIn your project settings.py file add a new line with:
WEBMENTIONS_USE_CELERY = FalseRun 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, aPendingOutgoingContentobject will be created. - When an incoming Webmention is received, a
PendingIncomingWebmentionobject will be created.
You can then batch-process these using the mentions_pending management command:
python manage.py mentions_pendingYou 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_pendingGo back and follow the rest of the instructions for django-wm