2025-09-19 16:17:46 +08:00
|
|
|
package data
|
2025-10-23 18:02:29 +08:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
2025-11-06 21:09:50 +08:00
|
|
|
"datart/data/postgres"
|
2025-10-23 18:02:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Process struct {
|
|
|
|
|
cancel context.CancelFunc
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewProcess() *Process {
|
|
|
|
|
return new(Process)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (p *Process) StartDataProcessing() {
|
|
|
|
|
ctx, cancel := context.WithCancel(context.Background())
|
|
|
|
|
p.cancel = cancel
|
2025-11-06 21:09:50 +08:00
|
|
|
postgres.GenSSU2ChannelSizes(ctx, 500)
|
2025-10-23 18:02:29 +08:00
|
|
|
updatingRedisPhasor(ctx)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (p *Process) Cancel() {
|
|
|
|
|
p.cancel()
|
|
|
|
|
}
|