|
@@ -104,9 +104,6 @@ class ItemBuffer(threading.Thread):
|
|
|
if isinstance(item, Item):
|
|
|
# 入库前的回调
|
|
|
item.pre_to_db()
|
|
|
- if item.dont_save:
|
|
|
- # 不保存数据
|
|
|
- return
|
|
|
|
|
|
self._items_queue.put(item)
|
|
|
|
|
@@ -181,6 +178,10 @@ class ItemBuffer(threading.Thread):
|
|
|
update_item.table_name = setting.TASK_REQUEST_PRODUCE
|
|
|
update_items.append(update_item)
|
|
|
|
|
|
+ if data.dont_save:
|
|
|
+ # 不保存数据
|
|
|
+ continue
|
|
|
+
|
|
|
items.append(data)
|
|
|
if setting.ITEM_FILTER_ENABLE:
|
|
|
items_fingerprints.append(data.fingerprint)
|