exclude system datapoints from saving
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -87,6 +88,12 @@ func (d *DBMHandler) SaveDb() (err error) {
|
||||
defer f.Close()
|
||||
|
||||
for _, dp := range d.DB.GetAllDatapoints(0) {
|
||||
//exclude System datapoints from saving
|
||||
//System datapoints are used for internal purposes and should not be saved in the database
|
||||
if strings.Contains(dp.Path, "System:") {
|
||||
continue
|
||||
}
|
||||
|
||||
b, er := json.Marshal(dp)
|
||||
if er != nil {
|
||||
return er
|
||||
|
Reference in New Issue
Block a user