Commit Graph

5203 Commits

Author SHA1 Message Date
ionutboangiu
8fec8dbca1 fix: maintain fallback subj keys configured order 2024-08-30 13:01:01 +02:00
armirveliaj
4dea21c268 Add new unit tests on engine 2024-08-22 20:41:28 +02:00
armirveliaj
8baf2f0988 Add new unit tests on engine 2024-08-21 21:07:15 +02:00
armirveliaj
dabbde881c Add coverage tests on engine 2024-08-21 21:07:15 +02:00
gezimblliku
ac44500fea updated dependencies to last versions 2024-08-21 21:04:36 +02:00
gezimblliku
b7b931b8f6 added datamanager GetTrendProfiles method && api 2024-08-21 21:04:36 +02:00
gezimblliku
58e419b002 updated trend structure && model 2024-08-16 12:32:21 +02:00
gezimblliku
b1218c4ae3 added service for trends 2024-08-16 12:32:21 +02:00
armirveliaj
4e6e1e8159 Add unit tests for trends 2024-08-16 11:34:45 +02:00
armirveliaj
67594abffb Add coverage tests on engine 2024-08-16 11:34:45 +02:00
armirveliaj
87648996c6 Add coverage tests on engine 2024-08-14 14:05:33 +02:00
ionutboangiu
6474c1076f update rpcclient library (#4413)
for more details: https://github.com/cgrates/rpcclient/pull/37
2024-08-14 14:04:33 +02:00
ionutboangiu
abba61723a Optimize removeFilterIndexesForFilter func (#4357)
Previously made two trips (get and set) for each group of items from
an index key being removed. Now, we fetch indexes once at the beginning
and store the updated indexes once at the end.

There was a difference compared to the previous v0.10 implementation
regarding the get/set behaviour. On v0.11, we used to get only the items
separately for each index and update only that index. Even though it
might have been more efficient, trips to the db are still too expensive
so it didn't matter much in the end.
2024-08-14 14:03:55 +02:00
gezimblliku
5b75bacff7 added trend with get,set and remove methods in datamanager 2024-08-14 14:03:21 +02:00
armirveliaj
6f65f09e4f Add new unit tests on engine 2024-08-12 18:37:15 +02:00
ionutboangiu
73fc386036 Add stordb pgSSLCertMode option 2024-08-12 18:36:45 +02:00
ionutboangiu
d0183597f1 Add postgres stor_db SSL opts 2024-08-09 09:13:10 +02:00
gezimblliku
22b96ca1e3 added tests for filter statmetric 2024-08-04 21:10:50 +02:00
armirveliaj
3d9a94c5c5 Add new unit tests 2024-08-04 21:04:41 +02:00
armirveliaj
f6f49f47a2 Add new unit tests on engine 2024-08-02 09:36:54 +02:00
arberkatellari
5ccb77c5dc Add mongo support for sessions backup 2024-07-22 15:31:02 +02:00
ionutboangiu
4cba4a699d Implement SharedActionsData for action groups
- holds common relevant data between actions.
- currently supports only *cdrlog, making the process more reliable
and less repetitive. It also provides access to more information about
actions when creating CDRs.
- easier to scale.
- removes the need for cloning accounts before executing a group of
actions.
- added Actions method to check if specific action types exist inside.
2024-07-21 19:04:53 +02:00
arberkatellari
dd5e5b1147 Revise debitCreditBalance 2024-07-14 14:11:16 +02:00
armirveliaj
54a90fe543 Add new unit test on engine 2024-07-14 14:07:21 +02:00
armirveliaj
fb04c28dab Add new unit tests on engine 2024-07-14 14:07:21 +02:00
gezimbll
85bd7a50e7 updated sags service name to ranking 2024-07-14 13:39:20 +02:00
gezimbll
4d4392d196 revised comments && renamed sars to trends 2024-07-14 13:39:20 +02:00
gezimbll
6c2fbbec28 added sars model,tp,api 2024-07-14 13:39:20 +02:00
ionutboangiu
9d7fcdc0c6 Ensure refund flag is not ignored when rerate is true
By default setting rerate to true also sets refund to true, but
flags should take precedence over defaults.

If rerate is true and refund is false, remove any previous
CostDetails from event to force rerate.

Centralize the configuration of processing args.
2024-07-14 13:28:18 +02:00
ionutboangiu
435e4f59b5 Add set_versions flag to cgr-engine
If set to true, it sets/overwrites all versions to the
current ones.
2024-07-14 13:27:09 +02:00
ionutboangiu
eb3bd5cc1d Add redisPoolPipelineLimit configuration field for datadb
Sets the maximum number of commands that can be pipelined before flushing.
0 means no limit and pipelines will only be limited by the time window.
2024-07-05 11:21:16 +02:00
ionutboangiu
ed3fa0d294 Add redisPoolPipelineWindow configuration field for datadb
Sets the duration after which internal pipelines are flushed.
0 disabled implicit pipelining.
2024-07-02 19:58:03 +02:00
armirveliaj
8447bbb084 Add new unit tests on engine 2024-07-01 20:37:09 +02:00
arberkatellari
b88602cdf3 Update rpcclient revising error handling 2024-06-30 17:55:09 +02:00
armirveliaj
9ba8feeb71 Add new unit tests on engine 2024-06-30 17:51:59 +02:00
armirveliaj
09ec973a92 Add new unit tests on engine 2024-06-30 17:51:59 +02:00
armirveliaj
6c7c54ab58 Add unit tests on engine 2024-06-30 17:51:59 +02:00
armirveliaj
a945fccad6 Add new unit tests on engine 2024-06-30 17:51:59 +02:00
gezimbll
777d4f0a28 added caching for sagprofile 2024-06-30 17:45:06 +02:00
gezimbll
dd7e1f9a0c tests for loading sagprofiles from csvreader 2024-06-30 17:45:06 +02:00
gezimbll
0012477d52 added stat aggregator profile,models,tps and apis 2024-06-30 17:45:06 +02:00
ionutboangiu
49f6c5982e Add reference value functionality to *transfer_balance action
The *transfer_balance action can now use a reference value to ensure
the destination balance reaches a specified amount. If the destination
balance exceeds the reference value, the excess is transferred back
to the source balance. If the destination balance is below the
reference value, the required amount is transferred from the source
balance to the destination balance to reach the specified reference
value. An error is returned if the transfer cannot achieve the
specified reference value.

Used by specifying DestinationReferenceValue inside ExtraParameters.

Other *transfer_balance changes:
- used json tags when unmarshaling ExtraParameters in order to be
able to shorten the names of the fields
- lock the destination account only if it's different from the
source account. It is still passed to the Guard function but
without a lock key and with 0 timeout.
- if the transfer happens within the same account, update the
account and execute its ActionTriggers only once.
- moved transfer units validation after retrieving/creating the
destination balance

*cdrlog action has been updated to create cdrs for reference
*transfer_balance actions, although improvements are needed and
the functionality is not completely tested.

APIerSv1.TransferBalance has been updated to take into account the
ReferenceValue parameter.

Added new *transfer_balance action unit tests to account for the
new changes.

Added integration tests (incomplete for now, but functionality
has been tested manually).
2024-06-13 13:56:40 +02:00
arberkatellari
f46b37bdf8 Make minor improvements to sessions backup 2024-06-12 18:21:50 +02:00
arberkatellari
f356695f6f Add active sessions backup functionalitiy 2024-06-12 18:21:50 +02:00
armirveliaj
ed9ac8965f Add unit tests on engine 2024-06-10 18:52:59 +02:00
gezimbll
7a32176f09 update rals flag to false when using refund 2024-06-10 13:00:02 +02:00
armirveliaj
a4edc5dfca Revise and add new test case on engine 2024-06-07 17:17:54 +02:00
armirveliaj
336b85e5dc Add new unit tests on engine 2024-06-07 17:17:54 +02:00
ionutboangiu
c32de12cee Reduce client connection attempts to test engine status (tests)
200 -> 16

Previously, considering the fibonacci back off strategy, if engine failed to
start it would have tried to attempt connections for 2.862799e+33 years.

Now, the amount of attempts is 16, equivalent to around 2 and a half seconds.
Should be more than enough, considering that usually 6-7 attempts are enough.
2024-06-06 13:30:14 +02:00
armirveliaj
f1d0be170d Revise and Add new unit tests on engine 2024-06-06 13:17:59 +02:00