mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-15 13:19:53 +05:00
Starting services message uniformity
This commit is contained in:
committed by
Dan Christian Bogos
parent
bee505b278
commit
e511a2e110
@@ -46,7 +46,7 @@ type AttributeService struct {
|
||||
|
||||
// ListenAndServe will initialize the service
|
||||
func (alS *AttributeService) ListenAndServe(exitChan chan bool) (err error) {
|
||||
utils.Logger.Info("Starting Attribute service")
|
||||
utils.Logger.Info(fmt.Sprintf("<%s> starting <%s> subsystem", utils.CoreS, utils.AttributeS))
|
||||
e := <-exitChan
|
||||
exitChan <- e // put back for the others listening for shutdown request
|
||||
return
|
||||
|
||||
@@ -48,7 +48,7 @@ type ChargerService struct {
|
||||
|
||||
// ListenAndServe will initialize the service
|
||||
func (cS *ChargerService) ListenAndServe(exitChan chan bool) (err error) {
|
||||
utils.Logger.Info(fmt.Sprintf("Starting %s", utils.ChargerS))
|
||||
utils.Logger.Info(fmt.Sprintf("<%s> starting <%s> subsystem", utils.CoreS, utils.ChargerS))
|
||||
e := <-exitChan
|
||||
exitChan <- e
|
||||
return
|
||||
|
||||
@@ -321,6 +321,7 @@ type ResourceService struct {
|
||||
|
||||
// Called to start the service
|
||||
func (rS *ResourceService) ListenAndServe(exitChan chan bool) error {
|
||||
utils.Logger.Info(fmt.Sprintf("<%s> starting <%s> subsystem", utils.CoreS, utils.ResourceS))
|
||||
go rS.runBackup() // start backup loop
|
||||
e := <-exitChan
|
||||
exitChan <- e // put back for the others listening for shutdown request
|
||||
|
||||
@@ -63,6 +63,7 @@ type StatService struct {
|
||||
|
||||
// ListenAndServe loops keeps the service alive
|
||||
func (sS *StatService) ListenAndServe(exitChan chan bool) error {
|
||||
utils.Logger.Info(fmt.Sprintf("<%s> starting <%s> subsystem", utils.CoreS, utils.StatS))
|
||||
go sS.runBackup() // start backup loop
|
||||
e := <-exitChan
|
||||
exitChan <- e // put back for the others listening for shutdown request
|
||||
|
||||
@@ -151,7 +151,7 @@ type SupplierService struct {
|
||||
|
||||
// ListenAndServe will initialize the service
|
||||
func (spS *SupplierService) ListenAndServe(exitChan chan bool) error {
|
||||
utils.Logger.Info("Starting Supplier Service")
|
||||
utils.Logger.Info(fmt.Sprintf("<%s> starting <%s> subsystem", utils.CoreS, utils.SupplierS))
|
||||
e := <-exitChan
|
||||
exitChan <- e // put back for the others listening for shutdown request
|
||||
return nil
|
||||
|
||||
@@ -139,6 +139,7 @@ type ThresholdService struct {
|
||||
|
||||
// Called to start the service
|
||||
func (tS *ThresholdService) ListenAndServe(exitChan chan bool) error {
|
||||
utils.Logger.Info(fmt.Sprintf("<%s> starting <%s> subsystem", utils.CoreS, utils.ThresholdS))
|
||||
go tS.runBackup() // start backup loop
|
||||
e := <-exitChan
|
||||
exitChan <- e // put back for the others listening for shutdown request
|
||||
|
||||
Reference in New Issue
Block a user