iloire / watchmen

A simple node.js service monitor
MIT License
941 stars 195 forks source link

Async Storage Provider Creation #59

Open GlennGeenen opened 8 years ago

GlennGeenen commented 8 years ago

I started creating a mongodb storage provider. The problem I'm having is that I can't do a clean setup since the creation of the storage happens sync for redis. For mongo I have to create a connection async, I can catch this later on but that means a lot of 'hacky' code to handle the async setup.

So what do you think, changing getStorageInstance to an async method?

iloire commented 8 years ago

If you are keen to include the mongodb storage provider I will be happy to accept a PR for asynchronous getStorageInstance :)