Skip to content

Commit

Permalink
Fixed args passing bug and exported error
Browse files Browse the repository at this point in the history
  • Loading branch information
michelvocks committed Jul 2, 2019
1 parent 2d6c485 commit ba9facd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gaia-pipeline/nodesdk",
"version": "0.1.4",
"version": "0.1.5",
"description": "NodeJS SDK for Gaia. Allows you to write pipelines in nodejs.",
"main": "sdk.js",
"repository": {
Expand Down
7 changes: 4 additions & 3 deletions sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ function executeJob(call, callback) {
// Start user defined job
let jobResult = {};
try {
job.handler(reqJob.arguments);
job.handler(reqJob.args);
} catch (ex) {
if (ex.toString() === ERR_EXIT_PIPELINE) {
if (ex.toString() !== ERR_EXIT_PIPELINE) {
jobResult.failed = true;
}

Expand Down Expand Up @@ -159,5 +159,6 @@ function Serve(jobs) {
}

module.exports = {
Serve: Serve
Serve: Serve,
ERR_EXIT_PIPELINE: ERR_EXIT_PIPELINE
};

0 comments on commit ba9facd

Please sign in to comment.