Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Updating init code callback logic #4

merged 2 commits into from Feb 1, 2012


None yet
2 participants

pagameba commented Feb 1, 2012

Hi Scott,

I've tweaked the logic for checking if it is safe to call the callback function during init. I haven't had any problems with this not working against my remote server.

I did remove the global timeout that calls the callback function even if not everything loads in this pull request. I was wondering if you would be interested in changing the callback to take an error as the first parameter and the cradle database object as the second parameter to match the general callback pattern used in most node modules. If this is done then the callback could be triggered on a timeout passing an error indicating that not all domains had finished initializing during the timeout period. The timeout period could be an option with a value of 0 being no timeout on initialize (and a default of 60)?

Scott Burch and others added some commits Feb 1, 2012

Scott Burch added timing to callback for init 46a517a
@pagameba pagameba reimplement the code which checks to ensure all the domains have been…
… loaded into the database before running the init callback to ensure that the domains are usable when the callback is run.

@scottburch scottburch added a commit that referenced this pull request Feb 1, 2012

@scottburch scottburch Merge pull request #4 from pagameba/paul
Updating init code callback logic

@scottburch scottburch merged commit 4e56a06 into scottburch:master Feb 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment