20 lines
510 B
Go
20 lines
510 B
Go
package tasks
|
|
|
|
import (
|
|
"context"
|
|
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/service"
|
|
)
|
|
|
|
func init() {
|
|
RegisterInnerTask("sync_traffic_pool_usage_daily", "SyncTrafficPoolUsageDaily")
|
|
RegisterInnerTask("sync_traffic_pool_usage_monthly", "SyncTrafficPoolUsageMonthly")
|
|
}
|
|
|
|
func (t Task) SyncTrafficPoolUsageDaily() {
|
|
service.TrafficPoolUsageSync().SyncDaily(context.Background())
|
|
}
|
|
|
|
func (t Task) SyncTrafficPoolUsageMonthly() {
|
|
service.TrafficPoolUsageSync().SyncMonthly(context.Background())
|
|
}
|