Browse Source

fix: 将flower放到web服务中;修复账号列表过滤节点的逻辑,获取所有子节点。

pull/6675/head
Bai 3 years ago committed by Jiangjie.Bai
parent
commit
aa37d86959
  1. 2
      apps/assets/api/accounts.py
  2. 4
      apps/common/management/commands/services/command.py

2
apps/assets/api/accounts.py

@ -40,7 +40,7 @@ class AccountFilterSet(BaseFilterSet):
if not node_id:
return qs
node = get_object_or_404(Node, pk=node_id)
node_ids = node.get_children(with_self=True).values_list('id', flat=True)
node_ids = node.get_all_children(with_self=True).values_list('id', flat=True)
node_ids = list(node_ids)
qs = qs.filter(asset__nodes__in=node_ids)
return qs

4
apps/common/management/commands/services/command.py

@ -36,7 +36,7 @@ class Services(TextChoices):
@classmethod
def web_services(cls):
return [cls.gunicorn, cls.daphne]
return [cls.gunicorn, cls.daphne, cls.flower]
@classmethod
def celery_services(cls):
@ -44,7 +44,7 @@ class Services(TextChoices):
@classmethod
def task_services(cls):
return cls.celery_services() + [cls.beat, cls.flower]
return cls.celery_services() + [cls.beat]
@classmethod
def all_services(cls):

Loading…
Cancel
Save