adding fileio permissions, and changes to db access

This commit is contained in:
Tommy Parnell
2014-05-07 14:42:03 -07:00
parent 91fb8d9e7d
commit 0ea807b1d1
2 changed files with 8 additions and 7 deletions

View File

@@ -9,11 +9,11 @@ namespace NOCQ
{
public RedisDatabase(){}
public static void SaveAlert(Alert alert, string host, string q)
public static void SaveAlert(Alert alert, string host, string q, int port, int timeout)
{
using (var redis = new RedisClient(host,
Convert.ToInt32(ConfigurationManager.AppSettings["Port"]),
Convert.ToInt32(ConfigurationManager.AppSettings["Timeout"])
port,
timeout
))
{
@@ -24,12 +24,12 @@ namespace NOCQ
}
public static Alert GetNextAlert(string host, string q )
public static Alert GetNextAlert(string host, string q, int port, int timeout )
{
using (var redis = new RedisClient(host,
Convert.ToInt32(ConfigurationManager.AppSettings["Port"]),
Convert.ToInt32(ConfigurationManager.AppSettings["Timeout"])
port,
timeout
))
{
var ts = redis.RPop(q);

View File

@@ -1,6 +1,6 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security.Permissions;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("NOCQ")]
@@ -15,6 +15,7 @@ using System.Runtime.CompilerServices;
// 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)]