node-deadline
A node.js JavaScript API to interface with Thinkbox Software's Deadline compute management system (website). This API bypasses the Deadline HTTP API and accesses the backend database directly. This allows for higher efficiency and stability, but requires that the Deadline database be setup properly for external connections.
Note: It is recommended that you setup authentication on your Deadline database when allowing external connections.
Installation
Easily install via npm.
$npm install --save node-deadline
Basic Usage
Setup a connection
The most basic form of the API requires a host name for your Deadline instance and optional port
var deadline = ; deadline;
Get Job Information
Once you have a deadline object, you can use it to get and set information in the Deadline repository.
deadlinegetjobsby;
Important Considerations
If the time and date settings on your node.js server are not set correctly, this will set improper dates in the Deadline database, causeing unforseen issues.
Advanced Connection Settings
The initializer can also take an object with more connection options. At minimum, the host must be defined.
var options = host: "deadline.host.com" port: 27070 deadline;
Options
- host: the host name or ip of the Deadline database (required)
- port: the conenction port for the deadline database (27070)
- readOnly: if true, does not allow changes to the database, logs all attempts (false)
- verbose: if true, enables verbose logging (false)
- test: if true, no connection attepts are made, and all queries are routed to Deadline.Test (false)
- username: username to use when authenticating with the database (null)
- password: password to use when authenticating with the database (null)
- authSource: authentication database to use on the mongo server (admin)
Authentication
If your Deadline database requires authentication in order to access and make changes, the constructor
object allows for this with the username
and password
properties.
Authentication doesn't take place until a read/write command is issued, so do not expect errors when simply creating the deadline object.
var options = host: "deadline.host.com" port: 27070 username: myUser password: myPass deadline;