MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / timeout

Method timeout

actions/steal_files_ssh.py:306–312  ·  view source on GitHub ↗

Timeout function to stop the execution if no SFTP connection is established.

()

Source from the content-addressed store, hash-verified

304 return 'failed'
305
306 def timeout():
307 """
308 Timeout function to stop the execution if no SFTP connection is established.
309 """
310 if not self.sftp_connected:
311 logger.error(f"No SFTP connection established within 4 minutes for {ip}. Marking as failed.")
312 self.stop_execution = True
313
314 timer = Timer(240, timeout) # 4 minutes timeout
315 timer.start()

Callers

nothing calls this directly

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected