From f46289828f52a05d4482ea1100d8a8fd5eaabd1d Mon Sep 17 00:00:00 2001 From: Trial97 Date: Tue, 20 Aug 2019 11:40:52 +0300 Subject: [PATCH] Added ApierV1.ComputeActionPlanIndexes --- apier/v1/apier.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apier/v1/apier.go b/apier/v1/apier.go index c749eccbc..5bfcd6dab 100644 --- a/apier/v1/apier.go +++ b/apier/v1/apier.go @@ -1218,3 +1218,18 @@ func (v1 *ApierV1) GetLoadTimes(args LoadTimeArgs, reply *map[string]string) (er } return } + +func (self *ApierV1) ComputeActionPlanIndexes(_ string, reply *string) (err error) { + if self.DataManager.DataDB().GetStorageType() != utils.REDIS { + return utils.ErrNotImplemented + } + redisDB, can := self.DataManager.DataDB().(*engine.RedisStorage) + if !can { + return fmt.Errorf("Storage type %s could not be cated to <*engine.RedisStorage>", self.DataManager.DataDB().GetStorageType()) + } + if err = redisDB.RebbuildActionPlanKeys(); err != nil { + return err + } + *reply = utils.OK + return nil +}