Skip to content

Commit

Permalink
Fix code (#113)
Browse files Browse the repository at this point in the history
* fix(): rename codeErrStopAppFailed to codeErrStopWorkerFailed

* chore(): format
  • Loading branch information
sunshinexcode authored Jul 25, 2024
1 parent 7822afd commit e1474c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/internal/code.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (

codeErrProcessManifestFailed = NewCode("10100", "process manifest json failed")
codeErrStartWorkerFailed = NewCode("10101", "start worker failed")
codeErrStopAppFailed = NewCode("10102", "stop worker failed")
codeErrStopWorkerFailed = NewCode("10102", "stop worker failed")
)

func NewCode(code string, msg string) *Code {
Expand Down
2 changes: 1 addition & 1 deletion server/internal/http_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (s *HttpServer) handlerStop(c *gin.Context) {
worker := workers.Get(req.ChannelName).(*Worker)
if err := worker.stop(req.RequestId, req.ChannelName); err != nil {
slog.Error("handlerStop kill app failed", "err", err, "worker", workers.Get(req.ChannelName), "requestId", req.RequestId, logTag)
s.output(c, codeErrStopAppFailed, http.StatusInternalServerError)
s.output(c, codeErrStopWorkerFailed, http.StatusInternalServerError)
return
}

Expand Down

0 comments on commit e1474c7

Please sign in to comment.