v1.5.1 增强程序稳定性
This commit is contained in:
@@ -92,8 +92,14 @@ func (this *Manager) Update(items []*serverconfigs.MetricItemConfig) {
|
||||
remotelogs.Println("METRIC_MANAGER", "start task '"+strconv.FormatInt(newItem.Id, 10)+"'")
|
||||
var task Task
|
||||
|
||||
if CheckSQLiteDB(newItem.Id) || !teaconst.EnableKVCacheStore {
|
||||
task = NewSQLiteTask(newItem)
|
||||
if CheckSQLiteDB(newItem.Id) {
|
||||
migrateErr := MigrateSQLiteTaskToKV(newItem)
|
||||
if migrateErr != nil {
|
||||
remotelogs.Error("METRIC_MANAGER", "migrate sqlite task failed: "+migrateErr.Error())
|
||||
task = NewSQLiteTask(newItem)
|
||||
} else {
|
||||
task = NewKVTask(newItem)
|
||||
}
|
||||
} else {
|
||||
task = NewKVTask(newItem)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user