Re-enabled scheduled tasks after fixing scheduled lib.
This commit is contained in:
parent
7a34d5bb34
commit
0df816689c
|
@ -7,6 +7,7 @@
|
||||||
"handy-httpd": "~>8.4.1",
|
"handy-httpd": "~>8.4.1",
|
||||||
"proper-d": "~>0.0.2",
|
"proper-d": "~>0.0.2",
|
||||||
"requests": "~>2.1.3",
|
"requests": "~>2.1.3",
|
||||||
|
"scheduled": "~>1.4.0",
|
||||||
"shared-utils": {
|
"shared-utils": {
|
||||||
"path": "../shared-utils"
|
"path": "../shared-utils"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
"path-matcher": "1.2.0",
|
"path-matcher": "1.2.0",
|
||||||
"proper-d": "0.0.2",
|
"proper-d": "0.0.2",
|
||||||
"requests": "2.1.3",
|
"requests": "2.1.3",
|
||||||
|
"scheduled": "1.4.0",
|
||||||
"shared-utils": {"path":"../shared-utils"},
|
"shared-utils": {"path":"../shared-utils"},
|
||||||
"slf4d": "3.0.1",
|
"slf4d": "3.0.1",
|
||||||
"streams": "3.5.0",
|
"streams": "3.5.0",
|
||||||
|
|
|
@ -4,6 +4,7 @@ import handy_httpd.handlers.file_resolving_handler;
|
||||||
import handy_httpd.components.optional;
|
import handy_httpd.components.optional;
|
||||||
import slf4d;
|
import slf4d;
|
||||||
import slf4d.default_provider;
|
import slf4d.default_provider;
|
||||||
|
import scheduled;
|
||||||
|
|
||||||
import std.json;
|
import std.json;
|
||||||
import std.stdio;
|
import std.stdio;
|
||||||
|
@ -43,16 +44,16 @@ void main() {
|
||||||
serversMutex = new Mutex();
|
serversMutex = new Mutex();
|
||||||
lastServerStatusTimestamp = Clock.currTime();
|
lastServerStatusTimestamp = Clock.currTime();
|
||||||
|
|
||||||
// JobScheduler scheduler = JobScheduler.getDefault();
|
JobScheduler scheduler = JobScheduler.getDefault();
|
||||||
// scheduler.addJob(
|
scheduler.addJob(
|
||||||
// &removeOldStartupRequests,
|
&removeOldStartupRequests,
|
||||||
// new FixedIntervalSchedule(minutes(5))
|
new FixedIntervalSchedule(minutes(5))
|
||||||
// );
|
);
|
||||||
// scheduler.addJob(
|
scheduler.addJob(
|
||||||
// &checkForOutOfDateServerStatus,
|
&checkForOutOfDateServerStatus,
|
||||||
// new FixedIntervalSchedule(minutes(1))
|
new FixedIntervalSchedule(minutes(1))
|
||||||
// );
|
);
|
||||||
// scheduler.start();
|
scheduler.start();
|
||||||
|
|
||||||
PathHandler handler = new PathHandler();
|
PathHandler handler = new PathHandler();
|
||||||
handler.addMapping(Method.POST, "/api/servers", &postServerStatus);
|
handler.addMapping(Method.POST, "/api/servers", &postServerStatus);
|
||||||
|
|
Loading…
Reference in New Issue