X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=cmd%2Frtmgr.go;h=568b7ad4f3287a10dcadc1bee2007106393e7d01;hb=b47d12de30e72b6e1017c93ca487279b09038e00;hp=24b917c4ee696f05ded1c551cbdff4a7028c9883;hpb=aaf8d396257a455247b24716a32b05fc3fd145c2;p=ric-plt%2Frtmgr.git diff --git a/cmd/rtmgr.go b/cmd/rtmgr.go index 24b917c..568b7ad 100644 --- a/cmd/rtmgr.go +++ b/cmd/rtmgr.go @@ -14,6 +14,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + + This source code is part of the near-RT RIC (RAN Intelligent Controller) + platform project (RICP). + + ================================================================================== */ /* @@ -41,7 +47,7 @@ import ( ) const SERVICENAME = "rtmgr" -const INTERVAL time.Duration = 2 +const INTERVAL time.Duration = 60 var ( args map[string]*string @@ -117,7 +123,6 @@ func serve(nbiEngine nbi.Engine, sbiEngine sbi.Engine, sdlEngine sdl.Engine, rpe go serveSBI(triggerSBI, sbiEngine, sdlEngine, rpeEngine) for { - time.Sleep(INTERVAL * time.Second) if *args["nbi"] == "httpGetter" { data, err := nbiEngine.(*nbi.HttpGetter).FetchAllXApps(*args["xm-url"]) if err != nil { @@ -128,6 +133,9 @@ func serve(nbiEngine nbi.Engine, sbiEngine sbi.Engine, sdlEngine sdl.Engine, rpe } triggerSBI <- true + + time.Sleep(INTERVAL * time.Second) + rtmgr.Logger.Debug("Periodic loop timed out. Setting triggerSBI flag to distribute updated routes.") } }