Skip to content

Commit c90aa9e

Browse files
committed
Add JobController
1 parent 2b79a1d commit c90aa9e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System.Collections.Generic;
2+
using System.Linq;
3+
using System.Net;
4+
using System.Web.Http;
5+
using System.Web.Http.Description;
6+
using IntegrationEngine.Core.Storage;
7+
using IntegrationEngine.Model;
8+
using IntegrationEngine.Scheduler;
9+
using Quartz.Impl.Matchers;
10+
using Quartz;
11+
12+
namespace IntegrationEngine.Api.Controllers
13+
{
14+
public class JobController : ApiController
15+
{
16+
public IEngineScheduler EngineScheduler { get; set; }
17+
18+
public JobController()
19+
{
20+
}
21+
22+
public JobController(IEngineScheduler engineScheduler)
23+
: this()
24+
{
25+
EngineScheduler = engineScheduler;
26+
}
27+
28+
public IHttpActionResult GetJobs()
29+
{
30+
return Ok(EngineScheduler.Scheduler.GetJobKeys(GroupMatcher<JobKey>.AnyGroup()).ToList());
31+
}
32+
33+
}
34+
}

0 commit comments

Comments
 (0)