Skip to content

Commit

Permalink
Merge pull request #187 from dusty/master
Browse files Browse the repository at this point in the history
payload can accept a querystring
  • Loading branch information
treeder committed Jul 19, 2014
2 parents 2247549 + d43f2a2 commit 2ab721e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/iron_worker_ng/code/runtime/node.rb
Expand Up @@ -10,13 +10,18 @@ def runtime_bundle(container, local = false)
/* #{IronWorkerNG.full_version} */ /* #{IronWorkerNG.full_version} */
var fs = require('fs'); var fs = require('fs');
var querystring = require('querystring');
var params = null; var params = null;
var task_id = null; var task_id = null;
var config = null; var config = null;
process.argv.forEach(function(val, index, array) { process.argv.forEach(function(val, index, array) {
if (val == "-payload") { if (val == "-payload") {
params = JSON.parse(fs.readFileSync(process.argv[index + 1], 'utf8')); try {
params = JSON.parse(fs.readFileSync(process.argv[index + 1], 'utf8'));
} catch(e) {
params = querystring.parse(fs.readFileSync(process.argv[index + 1], 'utf8'))
}
} }
if (val == "-config") { if (val == "-config") {
Expand Down

0 comments on commit 2ab721e

Please sign in to comment.