mirror of
https://github.com/ProudMuBai/GoFilm.git
synced 2026-02-21 18:14:42 +08:00
gather advice
This commit is contained in:
@@ -71,6 +71,13 @@ type FilmSource struct {
|
||||
Interval int `json:"interval"` // 采集时间间隔 单位/ms
|
||||
}
|
||||
|
||||
// FailureCollect 失败采集记录信息机构体
|
||||
type FailureCollect struct {
|
||||
Id string `json:"id"` // 采集站唯一ID
|
||||
Time int `json:"time"` // 采集时长
|
||||
PageNumber int64 `json:"pageNumber"` // 页码
|
||||
}
|
||||
|
||||
// SaveCollectSourceList 保存采集站Api列表
|
||||
func SaveCollectSourceList(list []FilmSource) error {
|
||||
var zl []redis.Z
|
||||
|
||||
@@ -132,6 +132,23 @@ func (jc *JsonCollect) GetSingleFilm(r util.RequestInfo, ids string) {
|
||||
//
|
||||
}
|
||||
|
||||
// FailureRecord 记录失败采集的相关信息, 用于后续采集重试操作
|
||||
func (jc *JsonCollect) FailureRecord(r util.RequestInfo) {
|
||||
// 记录采集失败时的采集参数
|
||||
|
||||
// 1. 采集站信息 (ID)
|
||||
|
||||
// 2. 采集参数, h 最新x小时影片, pg 页码
|
||||
|
||||
// 3. 将失败信息记录到redis ZSet集合中, score - time | member - data
|
||||
|
||||
}
|
||||
|
||||
// FilmDetailRetry 影片详情重试机制
|
||||
func (jc *JsonCollect) FilmDetailRetry(r util.RequestInfo) {
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------- XML Collect -------------------------------------------------
|
||||
|
||||
// XmlCollect 处理返回值为XML格式的采集数据
|
||||
|
||||
Reference in New Issue
Block a user