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
import json
import signal
import copy
from collections import defaultdict
from .conf import config
from .sshd import SSHServer
......
......@@ -170,9 +170,10 @@ class CommandRecorder(object):
if not data_set:
continue
logger.debug("Send {} commands to server".format(len(data_set)))
ok = self.storage.bulk_save(data_set)
if not ok:
self.queue.mput(data_set)
for i in range(5):
ok = self.storage.bulk_save(data_set)
if ok:
break
thread = threading.Thread(target=func)
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