From e5ed166572b47afde75d47f888768ae5b8d528f2 Mon Sep 17 00:00:00 2001 From: Tommy Parnell Date: Wed, 7 May 2014 14:57:15 -0700 Subject: [PATCH] minor changes --- src/NOCQ.Application/Program.cs | 30 +++++++++++++++++++---------- src/NOCQ/NOCQ.csproj | 4 +++- src/NOCQ/Properties/AssemblyInfo.cs | 2 +- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/NOCQ.Application/Program.cs b/src/NOCQ.Application/Program.cs index e5fcbd7..2c2c572 100644 --- a/src/NOCQ.Application/Program.cs +++ b/src/NOCQ.Application/Program.cs @@ -1,6 +1,8 @@ using System; using System.Dynamic; +using System.Linq; using NOCQ.Plugins.Email; +using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; @@ -10,17 +12,25 @@ namespace NOCQ.Application { public static void Main (string[] args) { - var al = new Alert() - {Data = "data", Runbook = "runbook", Service = "service", - Severity = "sev", - Source = "Source", - System = "System", - TimeStamp = new DateTime(2011,1,1) - }; + var list = new List(); + for (var i = 0; i < 3000; i++) + { + var al = new Alert() + {Data = "data" + Guid.NewGuid(), Runbook = "runbook", Service = "service", + Severity = "sev", + Source = "Source", + System = "System", + TimeStamp = new DateTime(2011,1,1) + }; + list.Add(al); + } + list.ForEach(al => RedisDatabase.SaveAlert(al, "127.0.0.1", RedisQueues.Input, 6379, 3000)); + for (var i = 0; i < 3000; i++) + { + var s = RedisDatabase.GetNextAlert("127.0.0.1", RedisQueues.Input, 6379, 3000); + Console.WriteLine(s.Data); + } - RedisDatabase.SaveAlert(al, "127.0.0.1", RedisQueues.Input, 6379, 3000); - var s = RedisDatabase.GetNextAlert("127.0.0.1", RedisQueues.Input, 6379, 3000); - Console.WriteLine(s.Data); Console.ReadLine(); } diff --git a/src/NOCQ/NOCQ.csproj b/src/NOCQ/NOCQ.csproj index 0870bec..f5541ed 100644 --- a/src/NOCQ/NOCQ.csproj +++ b/src/NOCQ/NOCQ.csproj @@ -67,7 +67,9 @@ - + + EmailSettings.cs + diff --git a/src/NOCQ/Properties/AssemblyInfo.cs b/src/NOCQ/Properties/AssemblyInfo.cs index 9318ac2..c61243c 100644 --- a/src/NOCQ/Properties/AssemblyInfo.cs +++ b/src/NOCQ/Properties/AssemblyInfo.cs @@ -15,7 +15,7 @@ using System.Security.Permissions; // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("1.0.*")] -[assembly: FileIOPermission] + // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. //[assembly: AssemblyDelaySign(false)]