Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var start_job = function(job) {
nodeio.start(job, function (err, output) {
if (!err) {
// not sure why this sends an array
sio.sockets.emit('repeater_strength', output[0])
} else {
sio.sockets.emit('repeater_strength', err)
}
}, true);
};
start_job(job1);
verbose(e);
}
this.emit(obj);
});
}
};
var job = new nodeio.Job({
auto_retry: true,
timeout: 20,
retries: 3,
silent: true
}, methods);
nodeio.start(job, {}, function(err, data) {
if (err) { callback(err); }
callback(null, data);
}, true);
};
var endData = "";
if (error) {
endData = "Error CO '" + input.Name + "' - " + error + "\n";
} else {
endData = "CO '" + input.Name + "' - " + data.message + "\n";
}
data.message = endData;
context.emit(data);
});
}
});
nodeio.start(job, {
args : [ data, onlyJson ]
}, function(error, data) {
if (error) {
callback(error, null);
return;
}
callback(null, data);
}, true);
};
if(vInfoUrls[u].indexOf('video/mp4') > 0) {
vDataUrl = vInfoUrls[u];
}
}
this.emit(vDataUrl);
} catch(e) {
this.exit(e);
}
}
});
}
});
nodeio.start(job, {args: [infoUrl]}, function(error,data) {
if(error) {
callback(error, id, null);
return;
}
callback(null, id, data[0]);
}, true);
};
crimeDataUpdater.client = client;
for (index in crimes) {
var cr = crimes[index];
crimeDataUpdater.postProcessScrapedData(cr);
crimeDataUpdater.upsertRecord(cr);
}
});
};
nodeio.start(crimeDataUpdater.job, crimeDataUpdater.jobOptions, crimeDataUpdater.outputCallback, true);
var fetchModel = function(id, callback) {
//Creates the job
var modelJob = new nodeio.Job({timeout:10}, modelMethods);
nodeio.start(modelJob, {args: [id]}, callback, true);
};
var fetchText = function(query, queryClass, callback) {
//Creates the job
var textJob = new nodeio.Job({timeout:10}, textMethods);
nodeio.start(textJob, {args: [query,queryClass]}, callback, true);
};