diff --git a/apier/apier.go b/apier/apier.go index 10de70996..665bcd85f 100644 --- a/apier/apier.go +++ b/apier/apier.go @@ -22,6 +22,7 @@ import ( "errors" "fmt" "path" + "time" "github.com/cgrates/cgrates/cache2go" "github.com/cgrates/cgrates/config" @@ -81,16 +82,16 @@ func (self *ApierV1) GetUserBalance(attr *AttrGetUserBalance, reply *engine.User } type AttrAddBalance struct { - Tenant string - Account string - BalanceId string - Direction string - Value float64 - //ExpirationDate time.Time - //RateSubject string - DestinationId string - Weight float64 - Overwrite bool // When true it will reset if the balance is already there + Tenant string + Account string + BalanceId string + Direction string + Value float64 + ExpirationDate time.Time + RateSubject string + DestinationId string + Weight float64 + Overwrite bool // When true it will reset if the balance is already there } func (self *ApierV1) AddBalance(attr *AttrAddBalance, reply *string) error { @@ -122,11 +123,11 @@ func (self *ApierV1) AddBalance(attr *AttrAddBalance, reply *string) error { BalanceId: attr.BalanceId, Direction: attr.Direction, Balance: &engine.Balance{ - Value: attr.Value, - //ExpirationDate: attr.ExpirationDate, - //RateSubject: attr.RateSubject, - DestinationId: attr.DestinationId, - Weight: attr.Weight, + Value: attr.Value, + ExpirationDate: attr.ExpirationDate, + RateSubject: attr.RateSubject, + DestinationId: attr.DestinationId, + Weight: attr.Weight, }, }, }) @@ -536,8 +537,6 @@ func (self *ApierV1) GetCachedItemAge(itemId string, reply *utils.CachedItemAge) return nil } - - func (self *ApierV1) LoadTariffPlanFromFolder(attrs utils.AttrLoadTpFromFolder, reply *string) error { loader := engine.NewFileCSVReader(self.RatingDb, self.AccountDb, utils.CSV_SEP, path.Join(attrs.FolderPath, utils.DESTINATIONS_CSV), diff --git a/data/scripts/optimize_proc.sh b/data/scripts/optimize_proc.sh new file mode 100644 index 000000000..571a79e03 --- /dev/null +++ b/data/scripts/optimize_proc.sh @@ -0,0 +1,7 @@ +#! /usr/bin/env sh + +for i in /sys/devices/system/cpu/cpu[0-9] +do + echo performance > $i/cpufreq/scaling_governor +done + diff --git a/docs/installation.rst b/docs/installation.rst index 76f9bfa94..c3f8fdaef 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -16,8 +16,8 @@ On the server you want to install CGRateS, simply execute the following commands :: cd /etc/apt/sources.list.d/ - wget -O - http://apt.itsyscom.com/repos/apt/conf/cgrates.gpg.key|apt-key add - - wget http://apt.itsyscom.com/repos/apt/conf/cgrates.apt.list + wget -O - http://apt.itsyscom.com/conf/cgrates.gpg.key|apt-key add - + wget http://apt.itsyscom.com/conf/cgrates.apt.list apt-get update apt-get install cgrates diff --git a/docs/tut_freeswitch_installs.rst b/docs/tut_freeswitch_installs.rst index a3f98facf..472b65dfb 100644 --- a/docs/tut_freeswitch_installs.rst +++ b/docs/tut_freeswitch_installs.rst @@ -35,7 +35,7 @@ We got FreeSWITCH_ installed via following commands: gpg --keyserver pool.sks-keyservers.net --recv-key D76EDC7725E010CF gpg -a --export D76EDC7725E010CF | sudo apt-key add - cd /etc/apt/sources.list.d/ - wget http://apt.itsyscom.com/repos/apt/conf/freeswitch.apt.list + wget http://apt.itsyscom.com/conf/freeswitch.apt.list apt-get update apt-get install freeswitch-meta-vanilla freeswitch-mod-json-cdr @@ -52,8 +52,8 @@ To get **CGRateS** installed execute the following commands over ssh console: :: cd /etc/apt/sources.list.d/ - wget -O - http://apt.itsyscom.com/repos/apt/conf/cgrates.gpg.key|apt-key add - - wget http://apt.itsyscom.com/repos/apt/conf/cgrates.apt.list + wget -O - http://apt.itsyscom.com/conf/cgrates.gpg.key|apt-key add - + wget http://apt.itsyscom.com/conf/cgrates.apt.list apt-get update apt-get install cgrates