fix: flower db file 持久化存储flower信息

pull/9108/head
Bai 2022-11-18 15:33:03 +08:00 committed by Jiangjie.Bai
parent 264c97888f
commit 0eb550f39b
1 changed files with 5 additions and 1 deletions

View File

@ -9,6 +9,10 @@ class FlowerService(BaseService):
def __init__(self, **kwargs):
super().__init__(**kwargs)
@property
def db_file(self):
return os.path.join(BASE_DIR, 'data', 'flower')
@property
def cmd(self):
print("\n- Start Flower as Task Monitor")
@ -20,11 +24,11 @@ class FlowerService(BaseService):
'-A', 'ops',
'flower',
'-logging=info',
'-db={}'.format(self.db_file),
'--url_prefix=/core/flower',
'--auto_refresh=False',
'--max_tasks=1000',
'--persistent=True',
'-db=/opt/jumpserver/data/flower.db',
'--state_save_interval=600000'
]
return cmd