...
Code Block |
---|
sudo su notifier /edx/app/notifier/virtualenvs/notifier/bin/python /edx/app/notifier/src/manage.py forums_digest --help /edx/app/notifier/virtualenvs/notifier/bin/python /edx/app/notifier/src/manage.py forums_digest --to_datetime=2015-11-13 --show-html OR (to limit the search to a single user) /edx/app/notifier/virtualenvs/notifier/bin/python /edx/app/notifier/src/manage.py forums_digest --to_datetime=2015-11-13 --show-html --users=12345 |
...
Deploying new code to Sandboxes (and up)
When you create a sandbox: https://tools-edx-jenkins.edx.org/job/Sandboxes/job/CreateSandbox/ you'll want to check the "notifier" box and set the "notifier_version" to your branch name. Once the sandbox is created, you can do the things below to run migrations (if necessary), restart the notifier workers and scheduler, and run the management command to send a test digest.
Code Block |
---|
cd /edx/app/notifier # may be different on stage source notifier_env source virtualenvs/notifier/bin/activate cd src/ # make sure to apply migrations if they haven't been applied yet sudo -E /edx/app/notifier/virtualenvs/notifier/bin/python manage.py migrate --fake-initial # restart notifier workers and scheduler /edx/bin/supervisorctl restart notifier-celery-workers /edx/bin/supervisorctl restart notifier-scheduler # run the forums_digest management command to see that an email will be properly rendered and sent # use today + 1 day as the datetime, pick a user who should get a digest (requires manual clicking in app) sudo -E /edx/app/notifier/virtualenvs/notifier/bin/python manage.py forums_digest --to_datetime=2017-10-24 --users=8 # verify no errors in log tail -n 100 /edx/var/log/supervisor/notifier-celery-workers-stderr.log |
...