-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat:增加煎蛋网无聊图 #115
feat:增加煎蛋网无聊图 #115
Conversation
order/prio.go
Outdated
@@ -24,6 +24,7 @@ const ( | |||
PrioDiana | |||
PrioFansDaily | |||
PrioFortune | |||
PrioJandan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
位置要符合英文字母顺序
plugin_jandan/cron.go
Outdated
|
||
func init() { | ||
go func() { | ||
defer order.DoneOnExit()() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不调用 GetLazyData 的 init 无需使用 DoneOnExit
plugin_jandan/cron.go
Outdated
} | ||
|
||
func travelWebpage() { | ||
err := db.Del("picture", "where 1 = 1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议使用 db.Truncate,但是每次更新全删掉的话,不如不用数据库
plugin_jandan/cron.go
Outdated
func travelWebpage() { | ||
err := db.Del("picture", "where 1 = 1") | ||
log.Errorln("[jandan]:", err) | ||
chanPicture = make(chan string, 100000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
太大了,而且不需要每次运行都新建
plugin_jandan/cron.go
Outdated
if err != nil { | ||
log.Errorln("[jandan]:", err) | ||
} | ||
go scorePicture() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个函数也不用每次运行都调用,不然不如不用 chan
plugin_jandan/data.go
Outdated
// 加载数据库 | ||
func init() { | ||
go func() { | ||
defer order.DoneOnExit()() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同理
No description provided.