@@ -408,7 +408,7 @@ func (s *httpServer) doPauseTopic(w http.ResponseWriter, req *http.Request, ps h
408408func (s * httpServer ) doDrainTopic (w http.ResponseWriter , req * http.Request , ps httprouter.Params ) (interface {}, error ) {
409409 reqParams , err := http_api .NewReqParams (req )
410410 if err != nil {
411- s .ctx . nsqd .logf (LOG_ERROR , "failed to parse request params - %s" , err )
411+ s .nsqd .logf (LOG_ERROR , "failed to parse request params - %s" , err )
412412 return nil , http_api.Err {400 , "INVALID_REQUEST" }
413413 }
414414
@@ -417,14 +417,14 @@ func (s *httpServer) doDrainTopic(w http.ResponseWriter, req *http.Request, ps h
417417 return nil , http_api.Err {400 , "MISSING_ARG_TOPIC" }
418418 }
419419
420- topic , err := s .ctx . nsqd .GetExistingTopic (topicName )
420+ topic , err := s .nsqd .GetExistingTopic (topicName )
421421 if err != nil {
422422 return nil , http_api.Err {404 , "TOPIC_NOT_FOUND" }
423423 }
424424
425425 err = topic .StartDraining ()
426426 if err != nil {
427- s .ctx . nsqd .logf (LOG_ERROR , "failure in %s - %s" , req .URL .Path , err )
427+ s .nsqd .logf (LOG_ERROR , "failure in %s - %s" , req .URL .Path , err )
428428 return nil , http_api.Err {500 , "INTERNAL_ERROR" }
429429 }
430430 return nil , nil
@@ -775,7 +775,7 @@ func getOptByCfgName(opts interface{}, name string) (interface{}, bool) {
775775}
776776
777777func (s * httpServer ) startDraining (w http.ResponseWriter , req * http.Request , ps httprouter.Params ) (interface {}, error ) {
778- err := s .ctx . nsqd .StartDraining ()
778+ err := s .nsqd .StartDraining ()
779779 if err != nil {
780780 return nil , http_api.Err {500 , "TODO" }
781781 }
0 commit comments