修改一下进程管理相关问题
This commit is contained in:
1
elastic/management/__init__.py
Normal file
1
elastic/management/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
8
elastic/management/commands/analyze_analytics.py
Normal file
8
elastic/management/commands/analyze_analytics.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
from elastic.es_connect import create_index_with_mapping, get_analytics_overview
|
||||
|
||||
class Command(BaseCommand):
|
||||
def handle(self, *args, **options):
|
||||
create_index_with_mapping()
|
||||
get_analytics_overview(force=True)
|
||||
self.stdout.write("analytics updated")
|
||||
Reference in New Issue
Block a user