/
BatchProcessOptions.ts
43 lines (39 loc) · 1.39 KB
/
BatchProcessOptions.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* `BatchProcessOptions` have no reasonable defaults, as they are specific to
* the API of the command that BatchCluster is spawning.
*
* All fields must be set.
*/
export interface BatchProcessOptions {
/**
* Low-overhead command to verify the child batch process has started. Will
* be invoked immediately after spawn. This command must return before any
* tasks will be given to a given process.
*/
versionCommand: string
/**
* If provided, and healthCheckIntervalMillis is greater than 0, or the
* previous task failed, this command will be sent to child processes.
*
* If the command outputs to stderr or returns a fail string, the process will
* be considered unhealthy and recycled.
*/
healthCheckCommand?: string | undefined
/**
* Expected text to print if a command passes. Cannot be blank. Strings will
* be interpreted as a regular expression fragment.
*/
pass: string | RegExp
/**
* Expected text to print if a command fails. Cannot be blank. Strings will
* be interpreted as a regular expression fragment.
*/
fail: string | RegExp
/**
* Command to end the child batch process. If not provided (or undefined),
* stdin will be closed to signal to the child process that it may terminate,
* and if it does not shut down within `endGracefulWaitTimeMillis`, it will be
* SIGHUP'ed.
*/
exitCommand?: string | undefined
}