hellgate/config/sys.config
Toporkov Igor c9440fd0bf
MSPF-475: Replaced sequences with bender (#345)
* Replaced sequnces with bender

* Nested bender generation call

* Added bender url to config

* Removed unnecessary lines

* Construct refund id without bender

* Implemented proper id construction

* Operator whitespace fix

* Refactored test

* Codestyle fix

* Removed bender

* Simplified max id search

* Renamed dmsl
2019-08-09 13:54:11 +03:00

112 lines
3.5 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/accounter",
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, #{
critical_fail_rate => 0.7,
timeout => 4000,
sliding_window => 60000,
operation_time_limit => 10000,
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
% }}
]}
]}
].