Commit Graph

1353 Commits

Author SHA1 Message Date
ionutboangiu
f1cc2d5102 Remove redundant returns after log.Fatal 2024-09-23 11:20:39 +02:00
ionutboangiu
798fc33bfc cgr-engine: Revise flag parsing error handling
Use flag.ExitOnError for automatic error handling.
Remove manual error check in main().
Set proper exit codes: 0 for help, 2 for parsing errors.
Avoid misleading '<InitS> error' log on help requests.
2024-09-23 11:20:39 +02:00
ionutboangiu
454c0552f2 Centralize test flags in utils for shared use across tests 2024-06-06 11:13:32 +02:00
arberkatellari
c03b2ae656 Add fatal logs on engine 2023-08-29 16:54:20 +02:00
ionutboangiu
c7d226f8bb Use a buffered os.Signal channel as argument to signal.Notify
signal.Notify documentation states that:

Package signal will not block sending to c: the caller must ensure that c
has sufficient buffer space to keep up with the expected signal rate. For a
channel used for notification of just one signal value, a buffer of size 1
is sufficient.
2023-07-18 16:37:06 +02:00
ionutboangiu
b7d172f78a Fix misspellings 2023-06-21 11:02:39 +02:00
ionutboangiu
3935a72605 Remove executable bit from .go files 2023-06-16 10:24:13 +02:00
ionutboangiu
cb7ea790de Update rpcclient library to latest version
Replace all instances of rpcclient.ClientConnector with birpc.ClientConnector.

Pass context, maxReconnectInterval, delayFunc and birpcClient to rpcclient
constructors.

Remove redundant time.Duration conversions (e.g. time.Duration(1*time.Second)
now becomes time.Second.

Add context where needed (context.Background() for tests, context.TODO()
for places where it should be passed from somewhere else).

Implement that functionality of the SessionSv1.Sleep call, in sessions/sessions
instead of apier/v1.

Make changes in utils/server.go (replacing the old rpc2 library with github.com/cgrates/birpc).

Change the way we register birpc methods for sessions in services, using a helper function
defined in engine/libengine.go.
2023-05-03 10:02:15 +02:00
ionutboangiu
3fac828218 Remove responder from the list of services managed by the ServiceManager
Since Responder can be started/reloaded/shut down through RALs, there is no need for ServiceManager to also be responsible for it. It also solves an issue where the RALs service would not be properly started because the manager had already started Responder before, and when RALs would try to do it as well, it returned with a 'service already running' error.
2023-03-28 17:59:32 +02:00
gezimbll
64c6d3358f adding meta storage types for migrator 2023-03-08 19:14:24 +01:00
gezimbll
7dcbd09a1f replacing non-meta constants for storage types 2023-03-08 19:14:24 +01:00
ionutboangiu
82468c580d Replace deprecated ioutil library, remove redundant statements + small optimizations 2022-12-02 14:24:18 +02:00
andronache
428cd37b8e Replaced header in multiple places 2021-11-01 13:50:23 +02:00
Trial97
db3bf9f40d Updated build tags 2021-08-30 17:55:51 +03:00
nickolasdaniel
674f3a8293 Fixed and tested cgr-loader tenant flag 2021-08-18 16:35:48 +02:00
nickolasdaniel
ce5a52f84a Added tenant flag for cgr-loader 2021-08-18 16:35:48 +02:00
porosnicuadrian
15612464e8 Double check on config sanity in cgr-engine.go 2021-04-06 11:14:20 +03:00
TeoV
40987e13fd Import in v0.10 Concurrent mechanism 2020-07-09 17:27:11 +03:00
Trial97
8b81b6b8e4 Added *none ERs type. Closes #2201 2020-06-02 15:10:32 +02:00
Trial97
33ce18585c Updated server error message 2020-05-29 12:19:59 +02:00
Trial97
84e05fd8f0 Removed GetInternalChan method from Service interface 2020-05-18 12:43:13 +02:00
DanB
f2aee9c2a4 Var rename in cgr-engine for APIerSv1 2020-05-08 18:07:08 +02:00
TeoV
87095fa53b Correct using a connID with two connections one of it *internal 2020-03-01 17:28:31 +01:00
TeoV
b3f7769cb7 Add support for Mongo for different Marshaler 2020-03-01 17:28:31 +01:00
adragusin
3eaf3232a1 Renamed ApierV1 to APIerSv1/ ApierV2 to APIerSv2 2020-01-30 14:06:48 +01:00
Trial97
f18525a1db Updated path for cdre 2020-01-30 10:21:48 +01:00
TeoV
a2dc836075 Add Apier as a standalone service 2020-01-29 18:16:51 +01:00
Trial97
a4870c5434 Updated FailedCDR posting 2020-01-28 10:07:34 +01:00
adragusin
f775181602 Added checkConfig flag at cgr-engine 2020-01-23 17:49:46 +02:00
TeoV
4083cf5627 Remove CDRC compoment ( replaced by EventReader) 2020-01-22 13:53:18 +02:00
adragusin
6605acec40 Added CGRateS and Go version at start 2020-01-21 18:14:57 +02:00
adragusin
3074d01797 updated IT tests in agents 2020-01-21 17:54:43 +02:00
adragusin
be393fd639 Updated IT tests 2020-01-17 17:55:00 +02:00
adragusin
8db2b85037 Updated IT tests/Updated systemd file (fixes #1859) 2020-01-16 18:07:02 +02:00
TeoV
35d19ab4b2 Add TTL option for DataDB/StorDB for type *internal 2020-01-14 08:42:10 -05:00
Dan Christian Bogos
95c2969452 Merge pull request #1853 from Trial97/master
Updated stordb config reload
2020-01-09 11:25:36 +01:00
TeoV
1e89bbacbe Make FilterS to use connections through connManager and update general_tests package 2020-01-09 11:57:04 +02:00
Trial97
47e975d0d0 Updated config reload 2020-01-09 08:05:20 +02:00
Trial97
d60ac504b1 Updated ConfigSv1.ReloadSections to ConfigSv1.ReloadConfigFromJSON 2020-01-09 08:05:20 +02:00
Trial97
21285b4bbc Removed unused connmanager service 2020-01-06 17:43:54 +02:00
Trial97
f5e9c99c02 Updated cgr-loader 2020-01-06 17:35:42 +02:00
TeoV
7b72c943a0 Add connections from remote and replicate throuh ConnManager 2020-01-06 09:27:34 -05:00
TeoV
cc14c1e25a Add Attribute connection from DispatcherS through ConnManager 2019-12-18 08:13:21 -05:00
Trial97
03f0d4bec1 Updated cgr-loader. Fixes #1817 2019-12-13 11:56:13 +02:00
TeoV
28868e8852 Add connections from Agents through ConnManager 2019-12-12 08:54:42 +02:00
TeoV
2ee574002a Add support for BiRPC in ConnManager 2019-12-12 08:54:42 +02:00
TeoV
c73ca0c954 Add connections from Agents through ConnManager 2019-12-12 08:54:42 +02:00
TeoV
33bb85658b Correct set ConnManager when use cgr-loader 2019-12-12 08:54:42 +02:00
TeoV
95477bcabc Add conncetions from Sessions and CDRs through ConnManager 2019-12-12 08:54:42 +02:00
TeoV
76ca5b9d68 Update after rebase 2019-12-12 08:53:55 +02:00