Hi, I have a function (f1) which performs some task (30 mins task), the function calls another function (f2) from an external assembly and submits another job to a cluster (this one takes sometime, few mins). I have put f2 in a try-catch block, but after few seconds, I get ThreadAbortException. Can you please help?
// from my controller
public ActionResult NewRequest()
{
BackgroundJob.Enqueue(() => f1());
}
[AutomaticRetry(Attempts = 0, DelaysInSeconds = new int[] { 3600 }, OnAttemptsExceeded = AttemptsExceededAction.Delete)]
public void f1()
{
//calls f2
try
{
f2()
}
catch
{
// getting ThreadAbortException here
}
}