Add the content field to FileInfo (#15749)
* Add the content field to FileInfo * Fixing the upgrade code * Trying to fix the text-scheme * Fixing test-schema * Fixing test-schema * Moving the migration to the next version
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9bff309dd0
Коммит
24621a22ed
@@ -2861,6 +2861,22 @@ func (s *TimerLayerFileInfoStore) Save(info *model.FileInfo) (*model.FileInfo, e
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerFileInfoStore) SetContent(fileId string, content string) error {
|
||||
start := timemodule.Now()
|
||||
|
||||
err := s.FileInfoStore.SetContent(fileId, content)
|
||||
|
||||
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
success := "false"
|
||||
if err == nil {
|
||||
success = "true"
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("FileInfoStore.SetContent", success, elapsed)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerFileInfoStore) Upsert(info *model.FileInfo) (*model.FileInfo, error) {
|
||||
start := timemodule.Now()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user