fd1456ac36e0a1ebfb800c9593f1540858ca7bea,src/python/pants/backend/core/tasks/reporting_server.py,KillServer,execute,#KillServer#,114

Before Change


  def execute(self):
    info = ReportingServerManager.get_current_server_info()
    if not info:
      print("No server found.", file=sys.stderr)
    // There should only be one pidfile, but in case there are many, we kill them all here.
    for pidfile, pid, port in info:
      with open(pidfile, "r") as infile:
        pidstr = infile.read()

After Change


    try:
      logger.info("Killing server with {pid} at http://localhost:{port}"
                  .format(pid=pid, port=server.socket))
      server.terminate()
    except ReportingServerManager.NonResponsiveProcess:
      logger.info("Failed to kill server with pid {pid}!".format(pid=pid))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: pantsbuild/pants
Commit Name: fd1456ac36e0a1ebfb800c9593f1540858ca7bea
Time: 2015-07-17
Author: kwilson@twopensource.com
File Name: src/python/pants/backend/core/tasks/reporting_server.py
Class Name: KillServer
Method Name: execute


Project Name: hanxiao/bert-as-service
Commit Name: fb2f7df2f773a067eab6af08f18f553185d5af27
Time: 2018-11-14
Author: hanhxiao@tencent.com
File Name: benchmark.py
Class Name:
Method Name:


Project Name: MVIG-SJTU/AlphaPose
Commit Name: 49dd75911a6b7c40d2c49c4e2106a95c4ed08b50
Time: 2020-08-15
Author: 510641426@qq.com
File Name: scripts/demo_inference.py
Class Name:
Method Name: