mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-26 06:52:53 +00:00
perf: jms脚本添加collectstatic命令
This commit is contained in:
parent
363baece4f
commit
cd6c7ce7fa
4
jms
4
jms
@ -125,7 +125,7 @@ if __name__ == '__main__':
|
|||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'action', type=str,
|
'action', type=str,
|
||||||
choices=("start", "stop", "restart", "status", "upgrade_db"),
|
choices=("start", "stop", "restart", "status", "upgrade_db", "collect_static"),
|
||||||
help="Action to run"
|
help="Action to run"
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
@ -142,6 +142,8 @@ if __name__ == '__main__':
|
|||||||
action = args.action
|
action = args.action
|
||||||
if action == "upgrade_db":
|
if action == "upgrade_db":
|
||||||
upgrade_db()
|
upgrade_db()
|
||||||
|
elif action == "collect_static":
|
||||||
|
collect_static()
|
||||||
else:
|
else:
|
||||||
services = args.services if isinstance(args.services, list) else [args.services]
|
services = args.services if isinstance(args.services, list) else [args.services]
|
||||||
if action == 'start' and {'all', 'web'} & set(services):
|
if action == 'start' and {'all', 'web'} & set(services):
|
||||||
|
Loading…
Reference in New Issue
Block a user