mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Fixed GetLoadHistory
This commit is contained in:
committed by
Dan Christian Bogos
parent
709c319c57
commit
ab083f93dc
@@ -1330,7 +1330,7 @@ func (ms *MongoStorage) GetLoadHistory(limit int, skipCache bool,
|
||||
Key string
|
||||
Value []*utils.LoadInstance
|
||||
}
|
||||
if err = ms.client.UseSession(ms.ctx, func(sctx mongo.SessionContext) (err error) {
|
||||
err = ms.client.UseSession(ms.ctx, func(sctx mongo.SessionContext) (err error) {
|
||||
cur := ms.getCol(colLht).FindOne(sctx, bson.M{"key": utils.LOADINST_KEY})
|
||||
if err := cur.Decode(&kv); err != nil {
|
||||
if err == mongo.ErrNoDocuments {
|
||||
@@ -1339,9 +1339,7 @@ func (ms *MongoStorage) GetLoadHistory(limit int, skipCache bool,
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
})
|
||||
cCommit := cacheCommit(transactionID)
|
||||
if err == nil {
|
||||
loadInsts = kv.Value
|
||||
|
||||
Reference in New Issue
Block a user