Skip to content

入库items 会出现重复 #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
oyjcmyn opened this issue Oct 14, 2024 · 0 comments
Open

入库items 会出现重复 #266

oyjcmyn opened this issue Oct 14, 2024 · 0 comments

Comments

@oyjcmyn
Copy link

oyjcmyn commented Oct 14, 2024

/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__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant