diff --git a/syncanysql/taskers/query.py b/syncanysql/taskers/query.py index cea4f0c..757a7f2 100644 --- a/syncanysql/taskers/query.py +++ b/syncanysql/taskers/query.py @@ -33,6 +33,8 @@ def __init__(self, executor, session_config, manager, arguments, tasker, config, self.batch_count = 0 def outputed(self, tasker, datas): + if not datas: + return if self.batch > 0 and self.count > 0 and self.count + len(datas) >= self.batch: self.count, self.batch_count = 0, 1 self.tasker.run_reduce(self.executor, self.session_config, self.manager, self.arguments, False)