Skip to content

Commit

Permalink
Use utility methods to manage synchronization of hostNames from the c…
Browse files Browse the repository at this point in the history
…luster
  • Loading branch information
piroor committed Nov 5, 2014
1 parent 544fdff commit 66a0301
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bin/droonga-http-server
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,12 @@ application.droonga({
plugins: options.plugins
});

application.connectionPool.updateHostNamesFromCluster()
.then(function(hostNames) {
application.connectionPool.startWatchClusterChanges();
});
application.connectionPool.startSyncHostNamesFromCluster();

server.listen(options.port, options.host);

function shutdown() {
application.connectionPool.endWatchClusterChanges();
application.connectionPool.stopSyncHostNamesFromCluster();
server.close();
if (options.pidFile && fs.existsSync(options.pidFile)) {
fs.unlinkSync(options.pidFile);
Expand Down

0 comments on commit 66a0301

Please sign in to comment.