Skip to content

Commit

Permalink
Deprecate "admin/reload"-endpoint (#255)
Browse files Browse the repository at this point in the history
The endpoint isn't used by ringpop-admin and, according to our internal metrics, has never been called in production.
Triggering a reload was probably useful during testing when the bootstrap file changed. With partition healing, we achieve a similar result in that the discover provider will be re-queried, except that it's automatic.
  • Loading branch information
mennopruijssers committed May 2, 2016
1 parent b983c0d commit 80a858f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ var baseEndpointHandlers = {
endpoint: '/admin/lookup',
handler: require('./lookup.js')
},
// Deprecated!
reload: {
endpoint: '/admin/reload',
handler: require('./reload.js')
Expand Down
4 changes: 4 additions & 0 deletions server/admin/reload.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

module.exports = function createReloadHandler(ringpop) {
return function handleReload(arg1, arg2, hostInfo, callback) {
ringpop.logger.warn('ringpop endpoint is deprecated: /admin/reload', {
local: ringpop.whoami(),
hostInfo: hostInfo
});
var body = arg2;
if (body && body.file) {
ringpop.reload(body.file, function(err) {
Expand Down

0 comments on commit 80a858f

Please sign in to comment.