New routing 2#201
Conversation
| [] -> | ||
| ok = log_rejected_route_groups(FilterResult, VS), | ||
| handle_filtered_routes_exhaustion(FilterResult, Revision, St, Action); | ||
| FilteredRoutes -> |
There was a problem hiding this comment.
Тут пропускается log_rejected_route_groups/2. Раньше мы в любом случае получали это в логи.
There was a problem hiding this comment.
Зачем ты это удалил?) Я о том что в FilteredRoutes матчинг этот лог тоже можно добавить.
| log_rejected_routes(in_blacklist, Routes, _VS) -> | ||
| ?LOG_MD(notice, "Route candidates are blacklisted: ~p", [Routes]); |
There was a problem hiding this comment.
Ты удалил его, теперь не летит is_blacklist
| construct_routing_failure(Error) when is_atom(Error) -> | ||
| construct_routing_failure([{unknown_error, Error}], undefined). |
There was a problem hiding this comment.
Мы теперь будем тут ловить 500ку, может не надо?
There was a problem hiding this comment.
вроде бы таких код пасов нет, так что и попадать сюда не должно
There was a problem hiding this comment.
Ну это не важно, это защита "на всякий случай", чтобы даже если кто-то в будущем что-то добавил и при этом не указал в этом списке у нас не рушился просто роутинг весь.
| fill_blacklist(_BlCtx, []) -> | ||
| []; | ||
| fill_blacklist(BlCtx, Routes) -> | ||
| [hg_inspector:fill_blacklist(R, BlCtx) || R <- Routes]. |
There was a problem hiding this comment.
Тут мы делаем цепной запрос в Inspector, может сделаем его параллельным?
| -spec from_payment_route(revision(), payment_route()) -> t(). | ||
| from_payment_route(Revision, Route) -> | ||
| ?route(ProviderRef, TerminalRef) = Route, | ||
| new(Revision, ProviderRef, TerminalRef, 0, 1000, undefined). |
There was a problem hiding this comment.
Вынеси в макрос, пожалуйста
There was a problem hiding this comment.
Значения 0 и 1000. Они стандартизированы и от них зависит роутинг, потому я хотел бы видеть их в виде макросов
| -export([fill_accepted/4]). | ||
| -export([get_routes/4]). | ||
|
|
||
| -callback fill(_Params, [hg_route:t()]) -> [hg_route:t()]. |
There was a problem hiding this comment.
Этот колбек никто не реализует.
| card_token => card_token() | undefined | ||
| }. | ||
|
|
||
| -type get_routes_resut() :: #{ |
There was a problem hiding this comment.
| -type get_routes_resut() :: #{ | |
| -type get_routes_result() :: #{ |
No description provided.