コード例 #1
0
ファイル: worker.py プロジェクト: Akhila-Yerukola/codalab-cli
 def _read(self, socket_id, uuid, path, read_args):
     run = self._get_run(uuid)
     if run is None:
         Run.read_run_missing(self._bundle_service, self, socket_id)
     else:
         # Reads may take a long time, so do the read in a separate thread.
         threading.Thread(target=Run.read,
                          args=(run, socket_id, path, read_args)).start()
コード例 #2
0
ファイル: worker.py プロジェクト: RogerXT/codalab-cli
 def _netcat(self, socket_id, uuid, port, message):
     run = self._worker_state_manager._get_run(uuid)
     if run is None:
         Run.read_run_missing(self._bundle_service, self, socket_id)
     else:
         # Reads may take a long time, so do the read in a separate thread.
         threading.Thread(target=Run.netcat,
                          args=(run, socket_id, port, message)).start()