Unverified Commit 529e5105 authored by 老广's avatar 老广 Committed by GitHub

Merge pull request #185 from jumpserver/dev

[Update] 修改命令上传
parents 337b6bb2 7afb1bd6
...@@ -9,7 +9,6 @@ import threading ...@@ -9,7 +9,6 @@ import threading
import json import json
import signal import signal
import copy import copy
from collections import defaultdict
from .conf import config from .conf import config
from .sshd import SSHServer from .sshd import SSHServer
......
...@@ -170,9 +170,10 @@ class CommandRecorder(object): ...@@ -170,9 +170,10 @@ class CommandRecorder(object):
if not data_set: if not data_set:
continue continue
logger.debug("Send {} commands to server".format(len(data_set))) logger.debug("Send {} commands to server".format(len(data_set)))
for i in range(5):
ok = self.storage.bulk_save(data_set) ok = self.storage.bulk_save(data_set)
if not ok: if ok:
self.queue.mput(data_set) break
thread = threading.Thread(target=func) thread = threading.Thread(target=func)
thread.daemon = True thread.daemon = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment