lint compliance or something

pull/1/head
ansuz 7 years ago
parent f134f11b73
commit 8e2c9ebfa3

@ -369,15 +369,19 @@ var getDeletedPads = function (Env, channels, cb) {
var sem = Saferphore.create(10); var sem = Saferphore.create(10);
var absentees = []; var absentees = [];
nThen(function (w) {
for (var i = 0; i < L; i++) { var job = function (channel, wait) {
let channel = channels[i]; return function (give) {
sem.take(function (give) { getFileSize(Env, channel, wait(give(function (e, size) {
getFileSize(Env, channel, w(give(function (e, size) {
if (e) { return; } if (e) { return; }
if (size === 0) { absentees.push(channel); } if (size === 0) { absentees.push(channel); }
}))); })));
}); };
};
nThen(function (w) {
for (var i = 0; i < L; i++) {
sem.take(job(channels[i], w));
} }
}).nThen(function () { }).nThen(function () {
cb(void 0, absentees); cb(void 0, absentees);

@ -63,7 +63,7 @@ var write = function (env, task, cb) {
return void cb(err); return void cb(err);
} }
})); }));
}).nThen(function (w) { }).nThen(function () {
// write the file to the path // write the file to the path
Fs.writeFile(mkPath(env, id), str, function (e) { Fs.writeFile(mkPath(env, id), str, function (e) {
if (e) { return void cb(e); } if (e) { return void cb(e); }

@ -335,7 +335,6 @@ define([
} }
store.anon_rpc.send('GET_DELETED_PADS', list, function (e, res) { store.anon_rpc.send('GET_DELETED_PADS', list, function (e, res) {
console.log(e, res);
if (e) { return void cb({error: e}); } if (e) { return void cb({error: e}); }
if (res && res.length && Array.isArray(res[0])) { if (res && res.length && Array.isArray(res[0])) {
cb(res[0]); cb(res[0]);

Loading…
Cancel
Save