Skip to content

Commit

Permalink
KnowsWhenItsWorking
Browse files Browse the repository at this point in the history
  • Loading branch information
chad committed Feb 10, 2010
1 parent 3ea97cb commit 8d406f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion resque-sharp/Job.cs
Expand Up @@ -50,7 +50,8 @@ internal void perform()
System.Reflection.MethodInfo methodInfo = PayloadClass().GetMethod("perform", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.FlattenHierarchy); System.Reflection.MethodInfo methodInfo = PayloadClass().GetMethod("perform", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.FlattenHierarchy);
if (methodInfo == null) if (methodInfo == null)
throw new NotImplementedException(); throw new NotImplementedException();
methodInfo.Invoke(null, args().ToArray()); object[] parameters = new object[1]{args().ToArray()};
methodInfo.Invoke(null, parameters);


} }


Expand Down
10 changes: 5 additions & 5 deletions resque-sharp/Worker.cs
Expand Up @@ -61,11 +61,11 @@ private void process(Job job, Func<Job, bool> block)
setWorkingOn(job); setWorkingOn(job);
job.perform(); job.perform();
} }
catch (Exception e) //catch (Exception e)
{ //{
job.fail(e); // job.fail(e);
setFailed(); // setFailed();
} //}
finally finally
{ {
if (block != null) if (block != null)
Expand Down

0 comments on commit 8d406f6

Please sign in to comment.