1.最后一次数据存储结构重构.

2.数据最接近需求方.
This commit is contained in:
eson
2020-07-20 18:13:54 +08:00
parent 6369387179
commit f0f83a9f00
9 changed files with 296 additions and 140 deletions

View File

@@ -36,8 +36,8 @@ func (oe *OpenrecExtractor) Execute() {
atomic.StoreInt32(&loop, 0)
}()
extractorStore := intimate.NewExtractorStore()
store := intimate.NewSourceStore("source_openrec")
extractorStore := intimate.NewStoreExtractor()
store := intimate.NewStoreSource("source_openrec")
var lasterr error = nil
for atomic.LoadInt32(&loop) > 0 {
@@ -90,7 +90,7 @@ func (oe *OpenrecExtractor) Execute() {
LiveUrl := "https://www.openrec.tv/live/" + userId
streamer.LiveUrl = sql.NullString{String: LiveUrl, Valid: true}
streamUid, err := extractorStore.InsertStreamer(streamer)
streamUid, err := extractorStore.UpdateStreamer(streamer)
if err != nil {
log.Println(err)
source.ErrorMsg = sql.NullString{String: err.Error(), Valid: true}
@@ -110,7 +110,7 @@ func (oe *OpenrecExtractor) Execute() {
return
}
extractorStore.UpdateStreamerLogUid(logUid, streamUid)
extractorStore.UpdateStreamerLog(logUid, streamUid)
source.Operator = int32(intimate.OperatorExtractorOK)
store.UpdateOperator(source)
} else {