2022-2023稳定运行版本

This commit is contained in:
2023-04-09 13:35:34 +08:00
parent 4f44e60168
commit cf80b07977
21 changed files with 332 additions and 321 deletions

View File

@@ -1,13 +0,0 @@
[common]
[database]
host = "localhost"
port = 5432
user = "postgres"
password = "postrootpwd"
db = "furryboard"
[spider_core]
host = "localhost"
port = 9101
bili_cookie = "buvid3=E114B569-ECF7-50D6-5874-7221C956F4F323116infoc; i-wanna-go-back=-1; _uuid=9DC109D51-C164-D1A8-D18D-CDB410A6B733223200infoc; buvid4=2EFA9D48-F352-9314-066E-800EAD1A3B3024163-022061118-7XDfT9HnZ75xcCl6GNqbKvvAaotbbCqK1dff9AggS2AFysI2RsiDgg%3D%3D; CURRENT_BLACKGAP=0; blackside_state=0; nostalgia_conf=-1; buvid_fp_plain=undefined; b_ut=5; LIVE_BUVID=AUTO2216549597211800; hit-dyn-v2=1; b_nut=100; fingerprint3=8b45c9c8e2c3bde2334046651927bc11; CURRENT_QUALITY=80; hit-new-style-dyn=0; CURRENT_FNVAL=4048; rpdid=|(J~R|~)~|Y)0J'uYY)Y|JmkY; dy_spec_agreed=1; fingerprint=64f6f507fa149d279783afea30316e2b; SESSDATA=0312b6e2%2C1687167210%2C5c48e%2Ac1; bili_jct=12bdeb674ff87c20afd2d245128d6734; DedeUserID=90931399; DedeUserID__ckMd5=507c5d481d60b7bb; sid=5n2lvshx; buvid_fp=64f6f507fa149d279783afea30316e2b; bp_t_offset_90931399=742134893995098144; PVID=2; share_source_origin=QQ; bsource=share_source_qqchat; b_lsid=4578914A_1853786E484; innersign=0"

View File

@@ -1,10 +1,10 @@
package task
import (
"github.com/eigeen/furryboard/spider-scheduler/pkg/conf"
"github.com/eigeen/furryboard/spider-scheduler/pkg/dao/model"
"github.com/eigeen/furryboard/spider-scheduler/pkg/log"
"github.com/eigeen/furryboard/spider-scheduler/pkg/logic"
"github.com/furryboard/spider-scheduler/pkg/conf"
"github.com/furryboard/spider-scheduler/pkg/dao/model"
"github.com/furryboard/spider-scheduler/pkg/log"
"github.com/furryboard/spider-scheduler/pkg/logic"
"time"
)

View File

@@ -1,11 +1,11 @@
package task
import (
"github.com/eigeen/furryboard/spider-scheduler/pkg/dao"
"github.com/eigeen/furryboard/spider-scheduler/pkg/dao/model"
"github.com/eigeen/furryboard/spider-scheduler/pkg/exception"
"github.com/eigeen/furryboard/spider-scheduler/pkg/log"
"github.com/eigeen/furryboard/spider-scheduler/pkg/logic"
"github.com/furryboard/spider-scheduler/pkg/dao"
"github.com/furryboard/spider-scheduler/pkg/dao/model"
"github.com/furryboard/spider-scheduler/pkg/exception"
"github.com/furryboard/spider-scheduler/pkg/log"
"github.com/furryboard/spider-scheduler/pkg/logic"
"math"
"time"
)
@@ -23,7 +23,7 @@ func UpdateUserInfo() {
return
}
pageSize := 32
pageSize := 1
maxPage := int(math.Ceil(float64(count) / float64(pageSize)))
for page := 0; page <= maxPage; page++ {
// 获取目标用户列表(分页)
@@ -61,7 +61,8 @@ func UpdateFans() {
// TODO: 与UpdateUserInfo有大量重复可抽离复用代码
// 预查询数量
var count int64
tx := dao.DB().Model(&model.Furry{}).Where("status = 0").Count(&count)
//tx := dao.DB().Model(&model.Furry{}).Where("status = 0").Count(&count)
tx := dao.DB().Model(&model.Furry{}).Count(&count)
if tx.Error != nil {
err := exception.ErrFetchFurries("获取furries数量失败" + tx.Error.Error())
log.Logger().Errorf("获取furries数量失败%s", err)

View File

@@ -1,8 +1,8 @@
package task
import (
"github.com/eigeen/furryboard/spider-scheduler/pkg/conf"
"github.com/eigeen/furryboard/spider-scheduler/pkg/log"
"github.com/furryboard/spider-scheduler/pkg/conf"
"github.com/furryboard/spider-scheduler/pkg/log"
"testing"
)