How to use the node.io.start function in node

To help you get started, we’ve selected a few node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Glench / Capstone-Tank-Robot-Software / webserver / app.js View on Github external
var start_job = function(job) {
            nodeio.start(job, function (err, output) {
                if (!err) {
                    // not sure why this sends an array
                    sio.sockets.emit('repeater_strength', output[0])
                } else {
                    sio.sockets.emit('repeater_strength', err)
                }
            }, true);
        };
        start_job(job1);
github catesandrew / recipe-parser / lib / scrub-simple-green-smoothies.js View on Github external
verbose(e);
        }

        this.emit(obj);
      });
    }
  };

  var job = new nodeio.Job({
    auto_retry: true,
    timeout: 20,
    retries: 3,
    silent: true
  }, methods);

  nodeio.start(job, {}, function(err, data) {
    if (err) { callback(err); }
    callback(null, data);
  }, true);
};
github tomayac / isearch / server / cofetch / store.js View on Github external
var endData = "";

            if (error) {
              endData = "Error CO '" + input.Name + "' - " + error + "\n";
            } else {
              endData = "CO '" + input.Name + "' - " + data.message + "\n";
            }

            data.message = endData;
            context.emit(data);
          });
        }
      });

  nodeio.start(job, {
    args : [ data, onlyJson ]
  }, function(error, data) {

    if (error) {
      callback(error, null);
      return;
    }
    callback(null, data);

  }, true);

};
github tomayac / isearch / server / cofetch / store.js View on Github external
if(vInfoUrls[u].indexOf('video/mp4') > 0) {
		                		vDataUrl = vInfoUrls[u];
		                	}
		                }
		            	
		                this.emit(vDataUrl);
		                
	            	} catch(e) {
	            		this.exit(e);
	            	}
	            }
	        });
	    }
	});
	
	nodeio.start(job, {args: [infoUrl]}, function(error,data) {
		
		if(error) {
			callback(error, id, null);
			return;
		}

		callback(null, id, data[0]);
		
	}, true);

};
github codeforamerica / colonel-clark / cron / update_crime_data.js View on Github external
crimeDataUpdater.client = client;

	for (index in crimes) {
	    var cr = crimes[index];

	    crimeDataUpdater.postProcessScrapedData(cr);
	    crimeDataUpdater.upsertRecord(cr);

	}

    });

};

nodeio.start(crimeDataUpdater.job, crimeDataUpdater.jobOptions, crimeDataUpdater.outputCallback, true);
github tomayac / isearch / server / cofetch / services / modeldb.js View on Github external
var fetchModel = function(id, callback) {
	//Creates the job
	var modelJob = new nodeio.Job({timeout:10}, modelMethods);
	nodeio.start(modelJob, {args: [id]}, callback, true);
};
github tomayac / isearch / server / cofetch / services / dbpedia.js View on Github external
var fetchText = function(query, queryClass, callback) {
	//Creates the job
	var textJob = new nodeio.Job({timeout:10}, textMethods);
	nodeio.start(textJob, {args: [query,queryClass]}, callback, true);
};