feapder icon indicating copy to clipboard operation
feapder copied to clipboard

入库items 会出现重复

Open oyjcmyn opened this issue 1 year ago • 0 comments

/usr/local/python3/lib/python3.11/site-packages/pymysql/connections.py:846: UserWarning: Previous unbuffered result was left incomplete warnings.warn("Previous unbuffered result was left incomplete") 感觉与这个有关系,有设置了REQUEST_FILTER_SETTING 为 filter_type=3 同时在入库前,有进行一行mysql find查询hash,但是最后还是会重复,从重复的入库时间来看,在同秒进入的。 `hash = torrent['info_hash']

    sql = f"SELECT `t_id`,`t_hash`,`t_douban_id`,`t_imdb_id` FROM `mv_torrent` WHERE t_hash='{hash}'"
    dbid = self.db.find(sql, 1)

    if not dbid and hash:

        item = MvTorrentItem()
        # item.t_add_time = tools.get_current_date()
        item.t_update_time = tools.get_current_date()`

是不是我再加一个ITEM_FILTER_ENABLE=True设置能解决?设置好__unique_key__

oyjcmyn avatar Oct 14 '24 16:10 oyjcmyn