forked from chad/resque-sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
30 lines (25 loc) · 909 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
namespace ExampleRunner
{
using System;
using System.Configuration;
using System.Reflection;
using resque;
class Program
{
static void Main(string[] args)
{
Console.WriteLine(resque.DummyJob.assemblyQualifiedName());
Type t = typeof(DummyJob);
Assembly.GetExecutingAssembly();
Console.WriteLine(t.AssemblyQualifiedName);
const string assemblyQualification = ", ExampleRunner, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
Resque.setAssemblyQualifier(assemblyQualification);
String server = ConfigurationManager.AppSettings["redis-host"];
String port = ConfigurationManager.AppSettings["redis-port"] ?? "6379";
Resque.setRedis(new Redis(server, Convert.ToInt32(port)));
Job.create("jobs", "DummyJob", "foo", 20, "bar");
Worker w = new Worker("*");
w.work(1);
}
}
}