party-management/config/sys.config
Roman Pushkov 60be383a3e HG-514: provider conversion routing (#367)
* add conversion service type to fd client

* fetch conversion stats in routing

* minor fix

* add deterministic operation id to fd client

* register conversion operations in invoice payment

* update routing

* fd client minor refactor

* add conversion scoring

* cleanup comments

* fix linter errors, export build_operation_id/2

* fix dialyzer error

* refactor

* fix argument naming

* conversion test

* minor naming updates

* move conversion service config to sys.config, minor fixes

* refactoring

* update tests

* update routing types

* fix tests

* update config

* move conversion service calls

* update tests

* explicit config for availability

* update routing

* clean comment

* update tests

* update routing

* update routing in invoice payment

* cleanup debug calls

* refactor fd calls

* fix typo

* add provider conversion to process payment

* cleanup invoice payment

* update routing in recurrent paytool

* update routing

* update tests

* fix fd call, clean ct:print

* refactor proxy provider

* fix wrong return

* missing full stop

* fd client update

* conversion service in invoice payment

* revert forgotten process payment changes

* cleanup

* fix typo

* fix scoring, cleanup

* narrow id() type in fd client

* proxy provider cleanup

* invoice payment fd calls refactoring

* add and improve routing tests

* update config, move start conversion service

* move notify fd, again

* fd notification minor rework

* only register payment processing with target processed

* fix

* fix config
2019-11-25 16:42:48 +03:00

120 lines
3.8 KiB
Plaintext

[
{kernel, [
{log_level, info},
{logger, [
{handler, default, logger_std_h, #{
level => error,
config => #{
type => standard_error
},
formatter => {logger_formatter, #{
depth => 30
}}
}},
{handler, console_logger, logger_std_h, #{
level => debug,
config => #{
type => {file, "/var/log/hellgate/console.json"},
sync_mode_qlen => 20
},
formatter => {logger_logstash_formatter, #{}}
}}
]}
]},
{scoper, [
{storage, scoper_storage_logger}
]},
{hellgate, [
{ip, "::"},
{port, 8022},
{default_woody_handling_timeout, 30000},
%% 1 sec above cowboy's request_timeout
{shutdown_timeout, 7000},
{protocol_opts, #{
% Bump keepalive timeout up to a minute
request_timeout => 6000,
% Should be greater than any other timeouts
idle_timeout => infinity
}
},
{services, #{
automaton => "http://machinegun:8022/v1/automaton",
eventsink => "http://machinegun:8022/v1/event_sink",
accounter => "http://shumway:8022/shumpune",
party_management => "http://hellgate:8022/v1/processing/partymgmt",
customer_management => "http://hellgate:8022/v1/processing/customer_management",
% TODO make more consistent
recurrent_paytool => "http://hellgate:8022/v1/processing/recpaytool",
fault_detector => "http://fault-detector:8022/v1/fault-detector"
}},
{proxy_opts, #{
transport_opts => #{
}
}},
{health_checkers, [
{erl_health, disk , ["/", 99] },
{erl_health, cg_memory, [99] },
{erl_health, service , [<<"hellgate">>]}
]},
{payment_retry_policy, #{
processed => {exponential, {max_total_timeout, 30}, 2, 1},
captured => no_retry,
refunded => no_retry
}},
{inspect_timeout, 3000},
{fault_detector, #{
timeout => 4000,
availability => #{
critical_fail_rate => 0.7,
sliding_window => 60000,
operation_time_limit => 10000,
pre_aggregation_size => 2
},
conversion => #{
critical_fail_rate => 0.7,
sliding_window => 6000000,
operation_time_limit => 1200000,
pre_aggregation_size => 2
}
}}
]},
{dmt_client, [
{cache_update_interval, 5000}, % milliseconds
{max_cache_size, #{
elements => 20,
memory => 52428800 % 50Mb
}},
{service_urls, #{
'Repository' => <<"http://dominant:8022/v1/domain/repository">>,
'RepositoryClient' => <<"http://dominant:8022/v1/domain/repository_client">>
}}
]},
{party_client, [
{services, #{
party_management => "http://hellgate:8022/v1/processing/partymgmt"
}},
{woody, #{
cache_mode => safe, % disabled | safe | aggressive
options => #{
woody_client => #{
event_handler => scoper_woody_event_handler
}
}
}}
]},
{how_are_you, [
{metrics_publishers, [
% {hay_statsd_publisher, #{
% key_prefix => <<"hellgate.">>,
% host => "localhost",
% port => 8125
% }}
]}
]}
].