Name: dray-client
Owner: Particle
Description: Node.js wrapper for managing Dray jobs
Created: 2016-06-24 10:52:16.0
Updated: 2017-05-04 17:21:33.0
Pushed: 2018-01-03 18:24:36.0
Homepage: https://spark.github.io/dray-client/
Size: 1282
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Before creating jobs, you need to initialize the job manager:
rt { DrayManager } from 'dray-client';
manager = new DrayManager(
'http://0.0.0.0:3000', // Dray URL
'redis://127.0.0.1:6379' // Redis URL
job = manager.createJob();
addStep('foo/bar') // Container to be run
submit(); // Fire and forget!
job = manager.createJob();
setInput('foo') // Data passed to container
addStep('centurylink/upper'); // Container to be run
ire and wait for promise
submit().then((value) => {
console.log("Result:", value);
reason) => {
console.error("Something bad happened:", reason)
rt { BuildpackJob } from 'dray-client';
compilation = new BuildpackJob(manager);
ilation.addFiles([
{name: 'foo.ino', data: new Buffer()}
ilation.setEnvironment({
PLATFORM_ID: 6
ilation.setBuildpacks([
'particle/buildpack-wiring-preprocessor',
'particle/buildpack-particle-firmware:0.5.1-photon'
ilation.submit().then((binaries) => {
// Do something with binaries
reason) => {
console.error("Compilation error:", reason)
dist
directory using npm build
npm version <major|minor|patch>
npm publish