Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.

Commit ef0a260

Browse files
committed
add params.preemptible
1 parent b15fcf2 commit ef0a260

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/jobs/create.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const chalk = require('chalk');
4141
* @param {number} [params.nodeAttrs] - Optional; a JSON expression describing the node attributes for a compatible GradientNode machine to run this job. See the Gradient-Node documentation for more info.
4242
* @param {boolean} [params.tail] - Optional; defaults to true in command line mode only. Specify false to disable automatic tailing.
4343
* @param {boolean} [params.json] - Optional; if true, do not write progress to standard out. '--json' with no value is equivalent to true.
44+
* @param {boolean} [params.preemptible] - Optional; if included job will be sent to a preemptible VM only. Defaults to false.
4445
* @param {function} cb - Node-style error-first callback function
4546
* @returns {object} job - The created job JSON object
4647
* @example
@@ -188,6 +189,8 @@ function create(params, cb) {
188189
delete params.tail;
189190
}
190191

192+
params.preemptible = !!params.preemptible
193+
191194
// XXX TODO trim leading/trailing spaces from input paths
192195
// XXX TODO whitelist git services
193196
// XXX TODO convert to gzip

0 commit comments

Comments
 (0)