You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/05/06 14:42:20 UTC

[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1814: fix: efficient error handling in manager-api including graceful shutdown, self contained methods.

bisakhmondal commented on a change in pull request #1814:
URL: https://github.com/apache/apisix-dashboard/pull/1814#discussion_r627484178



##########
File path: api/internal/utils/pid.go
##########
@@ -26,6 +26,9 @@ import (
 
 // WritePID write pid to the given file path.
 func WritePID(filepath string) error {
+	if _, err := os.Stat(filepath); err == nil {
+		return fmt.Errorf("instance of Manager API already running: a pid file exists in %s", filepath)

Review comment:
       Hii guys, as we are now supporting manager-api as an os service, the PID file should not be overwritten unknowingly, because then `./manager-api stop` won't work. we have to take help from the os service manager explicitly.
   
   > We may add an option to start forcely.
   Yes, we can do that.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org