if (! process.env.NODE_ENV) process.env.NODE_ENV = 'production'; var AuthClient = require('crp-auth-client'); var TaskClient = require('crp-task-client'); var TaskProducerClient = require('crp-task-producer-client'); var fs = require('fs'); //Authentication using your CrowdProcess login information AuthClient.login('email', 'password', function(err, credential) { if (err) throw err; //Options for creating task and dataunit stream var options = { bid: 1, program: fs.readFileSync('./lib/program.min.js', 'utf8'), //Reads source code for Run(data) function from file credential: credential }; createTask(options); }); function createTask(options) { var taskClient = TaskClient({ credential: options.credential }); //Create CrowdProcess task taskClient.tasks.create({ bid: options.bid,
ws.send(JSON.stringify(["chartTwo", dataChartTwo]), function() {}); newDataChartTwo = false; } } }, 1000); ws.on('close', function() { clearInterval(id); }); }); //Authentication using your CrowdProcess login information AuthClient.login('email', 'password', function(err, credential) { if (err) throw err; createTaskForMaxCalculations(credential); //createTaskForMaxSize(credential); }); var isSynced = false; var newDataChartOne = false; var newDataChartTwo = false; var dataChartOne = { "xScale": "ordinal", "yScale": "linear", "main": [ { "className": ".chartOne", "data": [] }
var spawn = require('child_process').spawn; var LZString = require('./pre/lib/LZString'); // Authentication credentials var userEmail = '*****@*****.**'; var userPwd = 'blablabla'; //Authentication using your CrowdProcess login information AuthClient.login(userEmail, userPwd, function(err, credential) { if (err) throw err; //Options for creating task and dataunit stream //Change program.js var options = { bid: 1, program: fs.readFileSync('./crowdprocess/build/aux-crowdprocess.js', 'utf8'), //Reads source code for Run(data) function from file credential: credential }; createTask(options); }); function createTask(options) { var taskClient = TaskClient({ credential: options.credential }); console.log('Before create task') //Create CrowdProcess task taskClient.tasks.create({