You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@netlify/async-workloads

Package Overview
Dependencies
Maintainers
23
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/async-workloads - npm Package Compare versions

Comparing version

to
0.0.15

36

_internal/scheduler.js

@@ -17,5 +17,3 @@ import {

import "./chunk-Z3PDUV4I.js";
import {
waitAMoment
} from "./chunk-QHZBJJIO.js";
import "./chunk-QHZBJJIO.js";

@@ -35,33 +33,3 @@ // src/functions/scheduler.ts

console.log("Scheduler Start. Run ID:", schedulerRunId);
await Promise.allSettled(availableProcessors.map(async (processorInfo) => {
try {
const start = Date.now();
let shouldRunProcessor = false;
try {
shouldRunProcessor = await processorInfo.shouldRun();
} catch (e) {
console.error("should run failed");
console.error(e);
}
const startRun = Date.now();
console.log("State processor should run? ", shouldRunProcessor, processorInfo.name, `in ${startRun - start}ms`);
if (shouldRunProcessor) {
const url = new URL(`${SITE_URL}${processorInfo.path}`);
url.searchParams.set("scheduler-run-id", schedulerRunId);
fetch(url, {
signal: AbortSignal.timeout(1e3 * 5)
}).catch((e) => {
console.error("processor fetch failure", url);
console.error(e);
});
await waitAMoment();
}
} catch (error) {
console.error(`Scheduler checked if it should run ${processorInfo.name} and it failed. It will not be ran.`);
console.error(error);
}
})).catch((e) => {
console.error("scheduler all settled failed.");
console.error(e);
});
console.log("do nothing");
console.log("Scheduler End. Run ID:", schedulerRunId);

@@ -68,0 +36,0 @@ }

2

package.json
{
"name": "@netlify/async-workloads",
"version": "0.0.14",
"version": "0.0.15",
"main": "index.js",

@@ -5,0 +5,0 @@ "module": "index.js",