diff --git a/Bootstrap.Admin/Controllers/Api/TasksController.cs b/Bootstrap.Admin/Controllers/Api/TasksController.cs
index 675e9dde..3ad24a8f 100644
--- a/Bootstrap.Admin/Controllers/Api/TasksController.cs
+++ b/Bootstrap.Admin/Controllers/Api/TasksController.cs
@@ -1,7 +1,5 @@
using Longbow.Tasks;
-using Longbow.Web.SignalR;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.SignalR;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@@ -25,22 +23,5 @@ namespace Bootstrap.Admin.Controllers.Api
TaskServicesManager.GetOrAdd("测试任务", token => Task.Delay(1000), TriggerBuilder.WithCronExpression("*/5 * * * * *"));
return TaskServicesManager.ToList().Select(s => new { s.Name, s.Enabled, s.Status, s.LastRuntime, s.CreatedTime, s.NextRuntime, Triggers = s.Triggers.Count, s.LastRunResult, TriggerExpression = s.Triggers.FirstOrDefault().ToString() });
}
-
- ///
- ///
- ///
- ///
- [HttpPost]
- public bool Post()
- {
- return true;
- }
-
- ///
- ///
- ///
- ///
- [HttpDelete]
- public bool Delete() => true;
}
}
diff --git a/UnitTest/Bootstrap.Admin/Api/TasksTest.cs b/UnitTest/Bootstrap.Admin/Api/TasksTest.cs
index 45237d7c..d8459e59 100644
--- a/UnitTest/Bootstrap.Admin/Api/TasksTest.cs
+++ b/UnitTest/Bootstrap.Admin/Api/TasksTest.cs
@@ -13,6 +13,13 @@ namespace Bootstrap.Admin.Api.SqlServer
{
var resp = await Client.GetAsJsonAsync>();
Assert.NotNull(resp);
+
+ // receive log
+ var recv = await Client.GetAsJsonAsync("/api/TasksLog?name=测试任务");
+ Assert.True(recv);
+
+ // for test SignalRManager.SendTaskLog
+ await System.Threading.Tasks.Task.Delay(6000);
}
}
}