Commit graph

12 commits

Author SHA1 Message Date
oleghasjanov
a11c0fca2d fix: handle HTTPClient::KeepAliveDisconnected in OrgRegistrantPhoneCheckerJob
This commit implements a reliable connection error handling solution for the
Company Register API integration. The job previously failed when connection
errors occurred without proper recovery mechanisms.
The implementation:
Adds a lightweight Retryable module with configurable retry logic
Implements smart caching of API responses (1 day expiration)
Handles common network errors like KeepAliveDisconnected and timeouts
Provides a fallback mechanism when all retry attempts fail
Ensures test reliability with cache-skipping in test environment
Testing:
Added specific tests for both recovery and fallback scenarios
Verified cache behavior in production and test environments
Resolves connection errors observed in production logs without adding
unnecessary complexity to the codebase.
2025-03-06 11:38:09 +02:00
olegphenomenon
48c14b8a39 fixed tests 2022-11-07 15:59:48 +02:00
Alex Sherman
1a8d8b52e7 Changed redis setup 2022-10-28 14:00:18 +03:00
Alex Sherman
dbe1678430 Add current limits to the error message 2022-10-28 14:00:18 +03:00
Alex Sherman
16d4e4b4e6 Fix throttling condition 2022-10-28 14:00:18 +03:00
Alex Sherman
f17ef17d16 Move throttling feature from gem back to the app 2022-10-28 14:00:18 +03:00
Thiago Youssef
e50501f13f Migrate ToCsv module to CsvGenerator service 2022-04-01 10:59:04 +03:00
dinsmol
f4e0084895 fixed codeclimate errors (partically) 2021-09-09 09:19:09 +03:00
dinsmol
67d7a307a1 replaced each to find_each 2021-08-13 12:45:54 +03:00
dinsmol
d2d31c049c refactored 2021-08-12 12:02:34 +03:00
dinsmol
7f8eee52f4 added csv download 2021-08-11 22:28:20 +03:00
Alex Sherman
1d5c46e6a0 Move ToStdout to /app/lib folder and include it in app.rb 2021-01-06 21:38:11 +05:00