Monitoring queues and deleting. #3292
Unanswered
johnbritto1
asked this question in
Help with using Postal
Replies: 1 comment
-
Unfortunately there is not an API for this currently. If you have access to the database server you could probably figure it out that way but not ideal. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I was able to execute the following command to get the queues details via 'Postal console',
To check queue mail waiting for more than 5 min:
QueuedMessage.where('server_id = ? AND created_at < ?', Server.find_by(permalink: 'mass-mail').id, 5.minutes.ago).count
To clear it:
QueuedMessage.where('server_id = ? AND created_at < ?', Server.find_by(permalink: 'mass-mail').id, 5.minutes.ago).delete_all
How to run it non interactively. I would like to write a nagios plugin to check the queues and a script to clear it. Is there any API build In?
Please guide.
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions