Long time no commit
This commit is contained in:
@@ -600,9 +600,9 @@ namespace Service.MeterProcessState.Controllers
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
AppVersionDic.Add(new CordonelAppVersion((int)item["AppId"], item["Version"].ToString(), a));
|
||||
}
|
||||
|
||||
@@ -659,5 +659,33 @@ namespace Service.MeterProcessState.Controllers
|
||||
return Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Route("TaskKillByTime")]
|
||||
public async Task<HttpResponseMessage> TaskKillByTime(int seconds = 300)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() =>
|
||||
{
|
||||
using (var dataacces = new SqlDataAccess(GlobalConfig.connectionString.Value))
|
||||
{
|
||||
//if (kill)
|
||||
//{
|
||||
// var dt = dataacces.ExecuteQuery("exec WhoLockNoFilter " + seconds);
|
||||
//}
|
||||
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
}));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.ToString() + "<br >" + ex.InnerException.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user