Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
dc5598f8
Commit
dc5598f8
authored
Oct 09, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改settings
parent
c6fef203
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
1 deletion
+12
-1
const.py
apps/assets/tasks/const.py
+4
-1
conf.py
apps/jumpserver/conf.py
+1
-0
settings.py
apps/jumpserver/settings.py
+3
-0
jms
jms
+4
-0
No files found.
apps/assets/tasks/const.py
View file @
dc5598f8
# -*- coding: utf-8 -*-
#
import
os
from
django.conf
import
settings
from
django.utils.translation
import
ugettext_lazy
as
_
PERIOD_TASK_ENABLED
=
os
.
environ
.
get
(
"PERIOD_TASK"
,
"on"
)
==
'on'
ENV_PERIOD_TASK
=
os
.
environ
.
get
(
"PERIOD_TASK"
,
"on"
)
==
'on'
PERIOD_TASK_ENABLED
=
settings
.
PERIOD_TASK_ENABLED
and
ENV_PERIOD_TASK
UPDATE_ASSETS_HARDWARE_TASKS
=
[
{
...
...
apps/jumpserver/conf.py
View file @
dc5598f8
...
...
@@ -391,6 +391,7 @@ defaults = {
'WINDOWS_SSH_DEFAULT_SHELL'
:
'cmd'
,
'FLOWER_URL'
:
"127.0.0.1:5555"
,
'DEFAULT_ORG_SHOW_ALL_USERS'
:
True
,
'PERIOD_TASK_ENABLED'
:
True
,
}
...
...
apps/jumpserver/settings.py
View file @
dc5598f8
...
...
@@ -650,3 +650,6 @@ CHANNEL_LAYERS = {
},
},
}
# Enable internal period task
PERIOD_TASK_ENABLED
=
CONFIG
.
PERIOD_TASK_ENABLED
jms
View file @
dc5598f8
...
...
@@ -415,6 +415,10 @@ def get_daemon_context():
files_preserve
.
append
(
daemon_log_f
)
context
=
daemon
.
DaemonContext
(
pidfile
=
pidfile
.
TimeoutPIDLockFile
(
daemon_pid_file
),
signal_map
=
{
signal
.
SIGTERM
:
lambda
x
,
y
:
clean_up
(),
signal
.
SIGHUP
:
'terminate'
,
},
stdout
=
daemon_log_f
,
stderr
=
daemon_log_f
,
files_preserve
=
files_preserve
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment