private void NotifyAllSubscribers(string commandType=null)
{
var msg = ControlCommand.Control;
if (commandType != null)
msg += ":" + commandType;
try
{
using (var redis = ClientsManager.GetClient())
{
foreach (var channel in Channels)
{
redis.PublishMessage(channel, msg);
}
}
}
catch (Exception ex)
{
if (this.OnError != null) this.OnError(ex);
Log.Warn("Could not send '{0}' message to bg thread: {1}".Fmt(msg, ex.Message));
}
}