add sleep
This commit is contained in:
3
sync.py
3
sync.py
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import time
|
||||||
import paramiko
|
import paramiko
|
||||||
import threading
|
import threading
|
||||||
import yaml
|
import yaml
|
||||||
@@ -27,6 +28,7 @@ def update_keys(host, port, user, keys):
|
|||||||
client.close()
|
client.close()
|
||||||
print('✅ ' + user + '@' + host)
|
print('✅ ' + user + '@' + host)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
time.sleep(1)
|
||||||
print('❌ ' + user + '@' + host)
|
print('❌ ' + user + '@' + host)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -56,6 +58,7 @@ def main():
|
|||||||
thread = task_thread(host['host'], host['port'], user_name, host_keys)
|
thread = task_thread(host['host'], host['port'], user_name, host_keys)
|
||||||
thread.start()
|
thread.start()
|
||||||
except:
|
except:
|
||||||
|
time.sleep(1)
|
||||||
print('❌ ' + user_name + '@' + host['host'])
|
print('❌ ' + user_name + '@' + host['host'])
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user