perf: jms脚本添加collectstatic命令

pull/6629/head
Bai 2021-08-11 14:26:23 +08:00 committed by Jiangjie.Bai
parent 363baece4f
commit cd6c7ce7fa
1 changed files with 3 additions and 1 deletions

4
jms
View File

@ -125,7 +125,7 @@ if __name__ == '__main__':
)
parser.add_argument(
'action', type=str,
choices=("start", "stop", "restart", "status", "upgrade_db"),
choices=("start", "stop", "restart", "status", "upgrade_db", "collect_static"),
help="Action to run"
)
parser.add_argument(
@ -142,6 +142,8 @@ if __name__ == '__main__':
action = args.action
if action == "upgrade_db":
upgrade_db()
elif action == "collect_static":
collect_static()
else:
services = args.services if isinstance(args.services, list) else [args.services]
if action == 'start' and {'all', 'web'} & set(services):