MCPcopy Index your code
hub / github.com/pixlcore/xyops / requireMaster

Method requireMaster

lib/api.js:525–540  ·  view source on GitHub ↗
(args, callback)

Source from the content-addressed store, hash-verified

523 }
524
525 requireMaster(args, callback) {
526 // make sure we are the master server
527 // otherwise throw an API error and return false
528 if (this.master) return true;
529
530 if (this.config.get('redirect_master_requests') && this.masterHost) {
531 // send back redirect to master server
532 args.request.headers.host = this.masterHost;
533 var url = this.web.getSelfURL( args.request, args.request.url );
534 callback( "302 Found", { Location: url }, "" );
535 return false;
536 }
537
538 callback({ code: 'master', host: this.masterHost || '', description: "This API call can only be invoked on the primary conductor server." });
539 return false;
540 }
541
542 getClientInfo(args, params) {
543 // proxy over to user module

Callers 15

api_dash_statsMethod · 0.95
api_master_commandMethod · 0.80
api_get_channelsMethod · 0.80
api_get_channelMethod · 0.80
api_create_channelMethod · 0.80
api_update_channelMethod · 0.80
api_delete_channelMethod · 0.80
api_get_active_jobsMethod · 0.80
api_get_jobMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected