How to use the batch-cluster.BatchClusterOptions 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 / ExifTool.ts View on Github external
* `perl`).
   */
  ignoreShebang: boolean
}

type Omit = Pick>

/**
 * Default values for `ExifToolOptions`, except for `processFactory` (which is
 * created by the ExifTool constructor)
 */
export const DefaultExifToolOptions: Omit<
  ExifToolOptions,
  "processFactory" | "ignoreShebang"
> = Object.freeze({
  ...new bc.BatchClusterOptions(),
  maxProcs: DefaultMaxProcs,
  maxTasksPerProcess: 500,
  spawnTimeoutMillis: 30000,
  taskTimeoutMillis: 20000, // see https://github.com/mceachen/exiftool-vendored.js/issues/34
  onIdleIntervalMillis: 2000,
  streamFlushMillis: 7, // just a little luck. 1 ms seems to work on linux, fwiw.
  taskRetries: 1,
  exiftoolPath: DefaultExifToolPath,
  exiftoolArgs: DefaultExiftoolArgs,
  exiftoolEnv: {},
  pass: "{ready}",
  fail: "{ready}",
  exitCommand: "-stay_open\nFalse\n",
  versionCommand: new VersionTask().command,
  numericTags: ["*Duration*", "GPS*", "Orientation"]
})