1.recordmode:Change "recordmode" from the original "1, 0" to "auto, event".
original is :1 is event record,0 is auto record.
2.eventleve:Change "eventlevel" from the original "0, 1" to "high, low".
original is :1 is event low,0 is event high.
This commit is contained in:
pg
2024-12-22 17:38:58 +08:00
committed by pggiroro
parent 3ea37046ff
commit 0913df7b8c
5 changed files with 27 additions and 10 deletions

View File

@@ -208,7 +208,10 @@ func (p *RecordFilePuller) Start() (err error) {
if p.PullStartTime, p.PullEndTime, err = util.TimeRangeQueryParse(p.PullJob.Args); err != nil {
return
}
tx := p.PullJob.Plugin.DB.Find(&p.Streams, "end_time>=? AND start_time<=? AND stream_path=? AND record_mode=0", p.PullStartTime, p.PullEndTime, p.PullJob.RemoteURL)
queryRecord := RecordStream{
Mode: EventLevelHigh,
}
tx := p.PullJob.Plugin.DB.Where(&queryRecord).Find(&p.Streams, "end_time>=? AND start_time<=? AND stream_path=?", p.PullStartTime, p.PullEndTime, p.PullJob.RemoteURL)
if tx.Error != nil {
return tx.Error
}