Socket
Socket
Sign inDemoInstall

bree

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bree - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

2

package.json
{
"name": "bree",
"description": "The best job scheduler for Node.js with support for cron, ms, and human-friendly strings. Uses workers and spawns sandboxed processes. Supports async/await, retries, throttling, concurrency, and cancelable promises (graceful shutdown). Simple, fast, and the most lightweight tool for the job. Made for Lad.",
"version": "0.0.10",
"version": "0.0.11",
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",

@@ -6,0 +6,0 @@ "ava": {

@@ -242,8 +242,10 @@ # [**bree**](https://github.com/breejs/bree)

// but this is a bit of a cleaner approach for worker termination
parentPort.postMessage('cancelled');
if (parentPort) parentPort.postMessage('cancelled');
else process.exit(0);
}
parentPort.once('message', message => {
if (message === 'cancel') return cancel();
});
if (parentPort)
parentPort.once('message', message => {
if (message === 'cancel') return cancel();
});
```

@@ -286,5 +288,4 @@

// signal to parent that the job is done
parentPort.postMessage('done');
// you could also `process.exit(0);` when done
if (parentPort) parentPort.postMessage('done');
else process.exit(0);
})();

@@ -296,3 +297,3 @@ ```

To close out the worker and signal that it is done, you can simply `parentPort.postMessage('done');` OR `process.exit(0)`.
To close out the worker and signal that it is done, you can simply `parentPort.postMessage('done');` and/or `process.exit(0)`.

@@ -299,0 +300,0 @@ While writing your jobs (which will run in [worker][workers] threads), you should do one of the following:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc