Queue, log and cron

Vestnik1 min readPage 8 of 12

All emails are queued; cron processes the queue in batches (vestnik_batch_size).

  • Sent emails are removed from the queue and go to the log with the “Sent” status.
  • On error the email stays in the queue and is retried: the first delay is vestnik_retry_delay minutes, each next one three times longer (5, 15, 45, 135…), at most a day.
  • After vestnik_max_attempts attempts the email moves to the log with the “Error” status and the reason; it can be resent with a button in the log.
  • The “Process queue” button on the “Queue” tab starts sending manually.
  • Email bodies in the log are deleted after vestnik_log_body_days days (they may contain password reset links), whole records after vestnik_log_keep_days. Cron does the cleanup about once an hour.
* * * * * php /path/to/site/core/components/vestnik/cron.php >> /path/vestnik-cron.log 2>&1