Commit b5333e02 authored by 段英荣's avatar 段英荣

modify topic transfer

parent 8c9bc355
......@@ -149,6 +149,7 @@ class TableSlicerChunk(ITableChunk):
class TableSlicer(object):
def __init__(self, queryset, chunk_size=None, chunk_count=None, sep_list=None):
try:
logging.info("duan add,before assert queryset")
assert isinstance(queryset, models.QuerySet)
......@@ -165,6 +166,8 @@ class TableSlicer(object):
assert (chunk_size is not None) + (chunk_count is not None) + (sep_list is not None) == 1
logging.info("duan add,after assert chunk_size")
logging.info("duan add,sep_list:%s" % str(sep_list))
if sep_list is not None:
sep_list = list(sep_list)
else:
......@@ -181,6 +184,8 @@ class TableSlicer(object):
self._model = queryset.model
self._query = queryset.query
self._sep_list = [None] + sep_list + [None]
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
def chunks(self):
......
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