|
|
|
@ -182,9 +182,16 @@ var Schedule = require("./schedule");
|
|
|
|
|
var Fse = require("fs-extra");
|
|
|
|
|
var nThen = require("nthen");
|
|
|
|
|
|
|
|
|
|
Decrees.load = function (Env, cb) {
|
|
|
|
|
Decrees.load = function (Env, _cb) {
|
|
|
|
|
Env.scheduleDecree = Env.scheduleDecree || Schedule();
|
|
|
|
|
|
|
|
|
|
var cb = Util.once(Util.mkAsync(function (err) {
|
|
|
|
|
if (err && err.code !== 'ENOENT') {
|
|
|
|
|
return void _cb(err);
|
|
|
|
|
}
|
|
|
|
|
_cb();
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
Env.scheduleDecree.blocking('', function (unblock) {
|
|
|
|
|
var done = Util.once(Util.both(cb, unblock));
|
|
|
|
|
nThen(function (w) {
|
|
|
|
|