Compare commits

...

2 Commits

@ -4,13 +4,13 @@ const path = require("path");
const reportErrors = require("report-errors"); const reportErrors = require("report-errors");
const mkdirp = require("mkdirp"); const mkdirp = require("mkdirp");
module.exports = function(errorPath) { module.exports = function(errorPath) {
mkdirp.sync(errorPath); mkdirp.sync(errorPath);
module.exports = reportErrors(errorPath, { module.exports = reportErrors(errorPath, {
doNotCrash: true, doNotCrash: true,
handler: (error, context) => { handler: (error, context) => {
console.error("Unhandled error", error.stack); console.error("Unhandled error:", error.stack);
if (error.rateLimited !== true) { if (error.rateLimited !== true) {
process.exit(1); process.exit(1);

@ -23,6 +23,10 @@ module.exports = function createPastebinComScraper(options = {}) {
let knownPastes = []; let knownPastes = [];
let previousKnownPastes = []; let previousKnownPastes = [];
if (options.pasteInterval == null) {
throw new Error("A `pasteInterval` is required in the `pastebinCom` scraper configuration, but none was provided");
}
debug(`Initializing with pasteInterval ${options.pasteInterval}, listInterval ${options.listInterval}, and listLimit ${options.listLimit}`); debug(`Initializing with pasteInterval ${options.pasteInterval}, listInterval ${options.listInterval}, and listLimit ${options.listLimit}`);
queue.define("fetchPaste", (task) => { queue.define("fetchPaste", (task) => {

Loading…
Cancel
Save