Skip to content

Instantly share code, notes, and snippets.

View ciwolsey's full-sized avatar

Carl Wolsey ciwolsey

  • Yorkshire, England
  • 02:57 (UTC +01:00)
View GitHub Profile
ping = require('ping');
function doPing(){
console.log("ping");
ping.sys.probe("youtube.com", function(alive){
console.log("pong");
});
}
var Fiber = require('fibers');
var Future = require('fibers/future');
var ping = require('ping');
function hostCheck(host){
var future = new Future;
console.log("ping");
ping.sys.probe(host, function(alive){
var Fiber = require('fibers');
var Future = require('fibers/future');
var ping = require('ping');
function hostCheck(host){
console.log("ping");
var future = new Future;
var Fiber = require('fibers');
var Future = require('fibers/future');
var ping = require('ping');
function hostCheck(host){
console.log("ping");
var future = new Future;
var Fiber = require('fibers');
var Future = require('fibers/future');
var ping = require('ping');
function hostCheck(host){
var fiber = Fiber.current;
ping.sys.probe(host, function(alive){
fiber.run(alive);
});
var Fiber = require('fibers');
var Future = require('fibers/future');
var ping = require('ping');
started = Date.now();
function hostCheck(host){
var fiber = Fiber.current;
ping.sys.probe(host, function(alive){

#####In this scenario I ran "meteor create" and "meteor" as a regular user. I get silently dumped back to the command prompt. Switching to an admin user WITHOUT removing the lock file and trying to run "meteor" results in the mongo error regarding lock files. I cannot get meteor to run at all using just a regular user. As you can see removing the lock file as a regular user makes no difference.

C:\Users\ciwolsey\Desktop>meteor create test4
test4: created.

To run your new app:
   cd test4
   meteor

C:\Users\ciwolsey\Desktop>cd test4
describe("The hostlogs", function(){
it("should allow inserting", function(){
amount = HostLogs.find().count();
HostLogs.insert({ip: "1.1.1.1", port: "80"});
newAmount = HostLogs.find().count();
newAmount.should.equal(amount + 1);
});
});
if (!(typeof MochaWeb === 'undefined')){
MochaWeb.testOnly(function(){
HostLogs.remove({});
describe("Server initialization", function(){
it("should have a Meteor version defined", function(){
chai.assert(Meteor.release);
});
});
----------- CONSOLE OUTPUT FROM console.log(results) --------------------------
I20141128-21:47:41.373(0)? { numberAffected: 1 }
I20141128-21:47:41.376(0)? { numberAffected: 1 }
I20141128-21:47:41.378(0)? { numberAffected: 1 }
--------------------------------------------------------------------------------
It's the result of a mongodb update. It seems to return one "{numberAffected: 1}"
for each document I affected. I'm trying to count the number of affected documents
but I'm not sure how to iterate over this to count them..