web stats
Mirth Community - View Single Post - DIY Queue Depth Alerts
View Single Post
  #5  
Old 02-20-2011, 06:04 AM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default

Thanks for the example. I will try using this, but have simplified by removing the database lookup for the queue count as shown by using the channelStatisticsController:

var channelStatisticsController = Packages.com.mirth.connect.server.controllers.Chan nelStatisticsController.getInstance();
var stats = channelStatisticsController.getStatistics(channelI d);
var numOfQueued = stats.queued;

if(numOfQueued % 100 == 0 && numOfQueued != 0)
{
//Generate an alert
alerts.sendAlert("\n\nChannel: "+channelName+"\n\nQueue Depth: "+numOfQueued);
}

Simon

Last edited by seaston; 02-20-2011 at 06:06 AM.
Reply With Quote