7377851c8303ece6773d6b68745580f8e4e8b907,service/server.py,BertServer,run,#BertServer#,47

Before Change


        poller = zmq.Poller()
        // Only poll for requests from backend until workers are available
        poller.register(self.backend, zmq.POLLIN)
        poller.register(self.frontend, zmq.POLLIN)

        job_queue, finish_jobs, job_checksum = [], {}, {}

        while True:

After Change


                // Handle worker activity on the backend
                request = self.backend.recv_multipart()
                worker, _, client = request[:3]
                if client == b"READY":
                    poller.register(self.frontend, zmq.POLLIN)
                    continue

                // parsing data size
                md = jsonapi.loads(request[-1])
                // receiving actual data
                request = self.backend.recv_multipart()
                worker, _, client = request[:3]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: hanxiao/bert-as-service
Commit Name: 7377851c8303ece6773d6b68745580f8e4e8b907
Time: 2018-11-13
Author: hanhxiao@tencent.com
File Name: service/server.py
Class Name: BertServer
Method Name: run


Project Name: hanxiao/bert-as-service
Commit Name: 6f325b9135a729a403840866fcb5248d71f54645
Time: 2018-11-13
Author: hanhxiao@tencent.com
File Name: service/server.py
Class Name: BertServer
Method Name: run


Project Name: hanxiao/bert-as-service
Commit Name: 815601e47f97acb3d00633d5ff172403c76bf034
Time: 2018-11-13
Author: hanhxiao@tencent.com
File Name: service/server.py
Class Name: BertServer
Method Name: run