Skip to content
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

saucenao/ascii2d任意一个引擎搜索失败时不把结果存入缓存 #202

Closed
Miuzarte opened this issue Jun 1, 2021 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@Miuzarte
Copy link

Miuzarte commented Jun 1, 2021

saucenao/ascii2d最近有小概率会搜索失败,然后不加--purge或者--a2d又没法重新搜索

@Tsuk1ko
Copy link
Owner

Tsuk1ko commented Jun 1, 2021

我是按这个逻辑设计的,如果有任意一个搜索失败了就不缓存

cq-picsearcher-bot/main.js

Lines 542 to 545 in 6a32ab3

// 将需要缓存的信息写入数据库
if (psCache.enable && success) {
psCache.set(img, db, needCacheMsgs);
}

@Miuzarte
Copy link
Author

Miuzarte commented Jun 1, 2021

我是按这个逻辑设计的,如果有任意一个搜索失败了就不缓存

cq-picsearcher-bot/main.js

Lines 542 to 545 in 6a32ab3

// 将需要缓存的信息写入数据库
if (psCache.enable && success) {
psCache.set(img, db, needCacheMsgs);
}

image

@Tsuk1ko
Copy link
Owner

Tsuk1ko commented Jun 1, 2021

得,有一个判断分支漏了

@Tsuk1ko Tsuk1ko added the bug Something isn't working label Jun 1, 2021
@Tsuk1ko Tsuk1ko closed this as completed in 705f90a Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants