mirror of https://github.com/jumpserver/jumpserver
Merge branch 'hot_fix_log' into dev
commit
f6c58054a6
|
@ -15,12 +15,11 @@ from struct import unpack
|
|||
from subprocess import Popen
|
||||
from sys import platform, prefix, stderr
|
||||
from tempfile import NamedTemporaryFile
|
||||
from jumpserver.api import logger
|
||||
|
||||
from jinja2 import FileSystemLoader, Template
|
||||
from jinja2.environment import Environment
|
||||
|
||||
from jumpserver.api import BASE_DIR
|
||||
from jumpserver.api import BASE_DIR, logger
|
||||
from jlog.models import Log
|
||||
|
||||
|
||||
|
@ -95,7 +94,6 @@ def kill_invalid_connection():
|
|||
if log.login_type == 'ssh':
|
||||
try:
|
||||
os.kill(int(log.pid), 9)
|
||||
|
||||
except OSError:
|
||||
pass
|
||||
elif (now - log.start_time).days < 1:
|
||||
|
@ -106,5 +104,3 @@ def kill_invalid_connection():
|
|||
log.save()
|
||||
logger.warn('kill log %s' % log.log_path)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue