batch-cluster
Advanced tools
Changelog
v5.1.0
ChildProcessFactory
supports thunks that return either a ChildProcess
or
Promise<ChildProcess>
Changelog
v5.0.0
rejectTaskOnStderr
API, which was added in v4.1.0 and applied to all
tasks for a given BatchCluster
instance, proved to be a poor decision, and
has been removed. The Parser
API, which is task-specific, now receives
both stdin and stderr streams. Parsers then have the necessary context to
decide what to do on a per task or per task-type basis.Changelog
v4.3.0
taskData
events with the data and the
current task (which may be undefined) as soon as the stream data is emitted.Changelog
v4.2.0
NoLogger
.
Consumers may use the ConsoleLogger
or another Logger
implementation as
they see fit.Changelog
v4.1.0
stderr
emissions:
BatchProcess.rejectTaskOnStderr
is a per-task, per-error predicate which
allows for a given error to be handled without always rejecting the task. This
can be handy if the script you're wrapping (like ExifTool) writes non-fatal
warnings to stderr.BatchProcessOptions.pass
and BatchProcessOptions.fail
can be RegExp
instances now, if you have more exotic parsing needs.Changelog
v4.0.0
💔 Using Node 8+ to determine if a process is running with kill(pid, 0)
turns out to be unreliable (as it returns true even after the process exits).
I tried to pull in the best-maintained "process-exists" external dependency,
but that pulled in 15 more modules (this used to be a zero-deps module), and
it was extremely unperformant on Windows.
The TL;DR: is that running(pid)
now returns a Promise<boolean>
, which had
far-reaching signature changes to accomodate the new asynchronicity, hence the
major version bump.
💔 In an effort to reduce this library's complexity, I'm removing retry functionality. All parameters associated to retries are now gone.
✨ Internal state validation is now exposed by BatchCluster, and is used by tests to ensure no internal errors happen during integration tests. Previously these errors were simply logged.
Changelog
v3.2.0
Logger
methods, withLevels
, withTimestamps
, and filterLevels
were shoved into a new Logger
namespace.Changelog
v3.1.0
Error:
prefixesonExit
that aren't fatal), we now log .error
rather than throw Error() or ignore.Changelog
v3.0.0
Task
promises are only rejected with Error
instances now. Note
that also means that BatchProcessObserver
types are more strict. It could be
argued that this isn't an API breaking change as it only makes rejection
values more strict, but people may need to change their error handling, so I'm
bumping the major version to highlight that. Resolves
#3. Thanks for the
issue, Nils Knappmeier!