Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To generate a test digest for yourself you can do something like thisthis (Make sure to update the date to be in the future.):

Code Block
$ ssh notifier-box.edx.org
$ source /edx/app/notifier/notifier_env
$ sudo -E /edx/app/notifier/virtualenvs/notifier/bin/python /edx/app/notifier/src/manage.py forums_digest --users=5182021 --to_datetime=2015-09-03 --show-html

To manually test on Stage:

  • Follow instructions above to receive digests
  • Make a change in Discussions that would be sent through the digest
  • Verify the following:
    • make sure you retrieve an email (i.e. checks scheduler is finding users and finding updates for digests)
    • make sure the html output looks good
    • make sure the text output looks good

Processes

There are two key components currently.

The Digest Creator

The digest creator which runs from the notifier user's crontab.  Any admin on the box can su to the notifier role.  As that user, your environment will contain all the environment specific variable required to configure the application. This job runs once a day at 00:00UTC and produces 24hrs, 1440 minuts, worth of digests.

The Celery Workers

These grab messages from a rabbit queue and send email.  This process is controlled by supervisord.  Run supervisorctl as root to check on the process and restart it.  Note: The current prod version of the supervisor job has a but which causes it to not stop cleanly.  This is fixed on stage and will be release on Monday.  In the meantime you will need to run "stop <job-name>" from the supervisorctl shell and then exit and run killall /opt/wwc/notifier/virtualenvs/notifier/bin/python as root to shutdown the subprocesses.

Known issues

Logging to rsyslog seems to have stopped working.  I'm still debugging the root cause.  However, useful log information for the celerly workers is being redirect to /tmp by supervisor.  Logging from the cron job is going to /var/spool/mail/notifier.