minor changes
This commit is contained in:
@@ -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<Alert>();
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
@@ -67,7 +67,9 @@
|
||||
<Compile Include="Imports\IDataImportHook.cs" />
|
||||
<Compile Include="Imports\DataImports.cs" />
|
||||
<Compile Include="Plugins\Email\ParseRule.cs" />
|
||||
<Compile Include="Plugins\Email\ImapInput.cs" />
|
||||
<Compile Include="Plugins\Email\ImapInput.cs">
|
||||
<DependentUpon>EmailSettings.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Model\Alert.cs" />
|
||||
<Compile Include="DB\RedisQueues.cs" />
|
||||
<Compile Include="DB\RedisDatabase.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)]
|
||||
|
||||
Reference in New Issue
Block a user