ee50791d77ee69305a55e9d5b47fed12076411f4,src/python/pants/bin/remote_pants_runner.py,RemotePantsRunner,_connect_and_execute,#RemotePantsRunner#Any#,161
Before Change
metadata_base_dir=pantsd_handle.metadata_base_dir,
)
timeout = global_options.pantsd_pailgun_quit_timeout
pantsd_signal_handler = PailgunClientSignalHandler(client, pid=pid, timeout=timeout)
with ExceptionSink.trapped_signals(pantsd_signal_handler), STTYSettings.preserved():
// Execute the command on the pailgun.
return client.execute(self._args[0], self._args[1:], modified_env)
def _extract_remote_exception(self, pantsd_pid, nailgun_error):
Given a NailgunError, returns a Terminated exception with additional info (where
possible).
After Change
}
command = self._args[0]
args = self._args[1:]
def signal_fn() -> bool:
return ExceptionSink.signal_sent() is not None
rust_nailgun_client = native.new_nailgun_client(port=port)
pantsd_signal_handler = PailgunClientSignalHandler(pid=pid)
retries = 3
attempt = 1
while True:
logger.debug(f"Connecting to pantsd on port {port} attempt {attempt}/{retries}")
with ExceptionSink.trapped_signals(pantsd_signal_handler), STTYSettings.preserved():
try:
output = rust_nailgun_client.execute(signal_fn, command, args, modified_env)
return output
// NailgunConnectionException represents a failure connecting to pantsd, so we retry
// up to the retry limit.
except native.lib.NailgunConnectionException as e:
if attempt > retries:
raise self.Fallback(e)
// Wait one second before retrying
logger.warning(f"Pantsd was unresponsive on port {port}, retrying.")
time.sleep(1)
attempt += 1
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: pantsbuild/pants
Commit Name: ee50791d77ee69305a55e9d5b47fed12076411f4
Time: 2020-10-07
Author: greg.shuflin@toolchain.com
File Name: src/python/pants/bin/remote_pants_runner.py
Class Name: RemotePantsRunner
Method Name: _connect_and_execute
Project Name: pantsbuild/pants
Commit Name: e179d9c5614f901b5c1ff0d3b7c09247ee8b04a8
Time: 2020-11-11
Author: stuhood@gmail.com
File Name: src/python/pants/bin/remote_pants_runner.py
Class Name: RemotePantsRunner
Method Name: _connect_and_execute
Project Name: probcomp/bayeslite
Commit Name: 5ba3581c4ff4584d56ef45ffbd9b94560d23b658
Time: 2015-03-18
Author: riastradh+probcomp@csail.mit.edu
File Name: src/schema.py
Class Name:
Method Name: bayesdb_install_schema