26 lines
396 B
Go
26 lines
396 B
Go
package data
|
|
|
|
import (
|
|
"context"
|
|
"datart/data/postgres"
|
|
)
|
|
|
|
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
|
|
postgres.GenSSU2ChannelSizes(ctx, 500)
|
|
updatingRedisPhasor(ctx)
|
|
}
|
|
|
|
func (p *Process) Cancel() {
|
|
p.cancel()
|
|
}
|