How to use the batch-cluster.logger function in batch-cluster

To help you get started, we’ve selected a few batch-cluster examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github photostructure / exiftool-vendored.js / src / ReadTask.ts View on Github external
protected parse(data: string, err?: Error): Tags {
    try {
      this._raw = JSON.parse(data)[0]
    } catch (jsonError) {
      // TODO: should restart exiftool?
      logger().warn("ExifTool.ReadTask(): Invalid JSON", {
        data,
        err,
        jsonError
      })
      throw orElse(err, jsonError)
    }
    // ExifTool does "humorous" things to paths, like flip path separators. resolve() undoes that.
    const SourceFile = _path.resolve(this._raw.SourceFile)
    // Sanity check that the result is for the file we want:
    if (SourceFile !== this.sourceFile) {
      // Throw an error rather than add an errors string because this is *really* bad:
      throw new Error(
        `Internal error: unexpected SourceFile of ${this._raw.SourceFile} for file ${this.sourceFile}`
      )
    }
    if (this.degroup) {
github photostructure / exiftool-vendored.js / src / ReadRawTask.ts View on Github external
protected parse(data: string, err?: Error): Tags {
    try {
      return JSON.parse(data)[0]
    } catch (jsonError) {
      logger().error("ExifTool.ReadRawTask(): Invalid JSON", { data })
      throw orElse(err, jsonError)
    }
  }
}
github photostructure / exiftool-vendored.js / src / update / mktags.ts View on Github external
.map(root => {
    logger().info("Scanning " + pattern + "...")
    return globule
      .find(pattern, { srcBase: root, nocase: true, nodir: true })
      .map(ea => _path.resolve(root + "/" + ea))
  })
  .reduce((prev, curr) => prev.concat(curr))