perf: 连接方式新增 guide 模式 (#11237)

Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
fit2bot
2023-08-09 22:59:53 +08:00
committed by GitHub
parent dcf113b87c
commit 4b72099053
4 changed files with 62 additions and 73 deletions

View File

@@ -1,18 +1,10 @@
from ..hands import *
from .base import BaseService
from ..hands import *
__all__ = ['FlowerService']
class FlowerService(BaseService):
def __init__(self, **kwargs):
super().__init__(**kwargs)
@property
def db_file(self):
return os.path.join(BASE_DIR, 'data', 'flower.db')
@property
def cmd(self):
print("\n- Start Flower as Task Monitor")
@@ -24,11 +16,9 @@ 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',
'--state_save_interval=600000'
]
return cmd