Commit 2724b0b8 authored by 段英荣's avatar 段英荣

modify

parent 30688c82
......@@ -50,7 +50,7 @@ class Command(BaseCommand):
from optparse import make_option
option_list = BaseCommand.option_list + (
make_option('-t', '--type', dest='type_list', action='append', help='type name to dump data to elasticsearch', metavar='TYPE',default=''),
make_option('-t', '--type', dest='type', action='append', help='type name to dump data to elasticsearch', metavar='TYPE',default=''),
make_option('-i', '--index-prefix', dest='index_prefix', help='index name to dump data to elasticsearch', metavar='INDEX_PREFIX'),
make_option('-p', '--parallel', dest='parallel', help='parallel process count', metavar='PARALLEL'),
make_option('-s', '--pks', dest='pks', help='specify sync pks, comma separated', metavar='PKS', default=''),
......@@ -60,14 +60,10 @@ class Command(BaseCommand):
def handle(self, *args, **options):
try:
option_type_list = list()
if len(self.option_list.type_list) > 0:
option_type_list = self.option_list.type_list.split(",")
type_name_list = get_type_info_map().keys()
for type_name in type_name_list:
if type_name not in option_type_list:
if len(self.option_list.type) and type_name!=self.option_list.type:
logging.warning("type_name:%s can not need to execute!" % type_name)
continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment