Skip to content
Snippets Groups Projects
Commit 965956e7 authored by Charlie Smurthwaite's avatar Charlie Smurthwaite
Browse files

update to monitoring script

parent d076a854
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -3,5 +3,5 @@ require_relative '../lib/postal/config'
require 'mysql2'
 
client = Mysql2::Client.new(:host => Postal.config.main_db.host, :username => Postal.config.main_db.username, :password => Postal.config.main_db.password, :port => Postal.config.main_db.port, :database => Postal.config.main_db.database)
result = client.query("SELECT COUNT(id) as size FROM `queued_messages` WHERE retry_after IS NULL OR retry_after <= ADDTIME(UTC_TIMESTAMP(), '30')")
result = client.query("SELECT COUNT(id) as size FROM `queued_messages` WHERE retry_after IS NULL OR retry_after <= ADDTIME(UTC_TIMESTAMP(), '30') AND locked_at IS NULL")
puts result.to_a.first['size']
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment