Giter Club home page Giter Club logo

Comments (6)

dscape avatar dscape commented on September 28, 2024

e.g.

WatchMen.prototype.start = function (cb){
 var self = this;
 self.daemon_status = 1;

 function launch (service){
   self.ping ({service:service}, function (err, state){
    if (err){ console.error (err); }

    if (self.daemon_status){
     setTimeout(launch, parseInt(state.next_attempt_secs, 10) * 1000, service);
    }
   });
 }

 this.services(function (err, services) {
   if(err) {
     console.log("Exiting: " + err.message);
     process.exit();
   }
   services.forEach(function(service){
     if (service.enabled !== false){
      launch(service);
     }
    });

    console.log('watchmen monitor started.');
    cb();
 });
};

from watchmen.

iloire avatar iloire commented on September 28, 2024

Yes, resolving dynamically what servers to ping would be nice (so you can keep them in a database and add/remove services while the process is running). Now you have to change the config file and restart the process, what is not as good.

from watchmen.

ericelliott avatar ericelliott commented on September 28, 2024

I see this issue was opened 3 years ago... is this actively maintained?

from watchmen.

iloire avatar iloire commented on September 28, 2024

@ericelliott Yes, it is. I guess nobody has issued a PR for this yet... If you do, I will happily review it and merge it.

from watchmen.

ericelliott avatar ericelliott commented on September 28, 2024

👍

from watchmen.

iloire avatar iloire commented on September 28, 2024

Thanks for raising this issue. This has been Implemented in b8b5bb5

from watchmen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.