Skip to content

master -> legacy-production#72

Closed
dapi wants to merge 57 commits intolegacy-productionfrom
master
Closed

master -> legacy-production#72
dapi wants to merge 57 commits intolegacy-productionfrom
master

Conversation

@dapi
Copy link
Copy Markdown

@dapi dapi commented Dec 25, 2025

No description provided.

m1ndg8mer and others added 30 commits February 7, 2025 08:50
* Моделька exchange_rate_limit

* Перевод строки
Remove rails and draper version lock
dapi and others added 27 commits November 25, 2025 11:43
Fix CI failure caused by outdated Gemfile.lock after version bump.
The gemspecs for path gems changed but the lockfile wasn't updated.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace all Sidekiq workers with ActiveJob jobs
- Convert RatesWorker concern to RatesJob concern
- Use limits_concurrency for Solid Queue instead of sidekiq-unique-jobs
- Replace perform_async with perform_later
- Update all model and controller references
- Create new job spec files, remove old worker specs

Jobs converted:
- DirectionsRatesJob
- CurrencyRatesJob
- ExternalRatesBatchJob
- ExternalRateSaverJob
- ExchangeRateUpdaterJob
- CreateHistoryIntervalsJob
- CbrRatesJob, CbrAvgRatesJob
- BinanceRatesJob, ExmoRatesJob, BybitRatesJob
- BitfinexRatesJob, CryptomusRatesJob
- GarantexioRatesJob, FfFixedRatesJob, FfFloatRatesJob

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Solid Queue passes the job instance to the key lambda, but our lambdas
expected no arguments. Changed from `-> { key }` to `->(_job) { key }`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace sidekiq gem with solid_queue in gemspec
- Update lib/gera.rb to require solid_queue instead of sidekiq
- Remove sidekiq/testing from spec_helper, use ActiveJob test adapter
- Remove incorrect SolidQueue::Job::Concurrency include (engine auto-includes)

SolidQueue's engine automatically includes ActiveJob::ConcurrencyControls
which provides the limits_concurrency method for concurrency control.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Major version bump due to migration from Sidekiq to ActiveJob.

Breaking changes:
- All workers renamed to jobs (e.g., ExmoRatesWorker → ExmoRatesJob)
- Sidekiq dependency replaced with solid_queue
- Worker concerns renamed to job concerns (RatesWorker → RatesJob)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update log message in ExchangeRate#update_finite_rate! to reflect
the ActiveJob method name after Sidekiq migration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace `open(url).read` with `Net::HTTP.get(uri)` in ExmoFetcher
- Replace `open uri` with `URI.open(uri)` in CbrRatesJob
- Centralize require 'open-uri' and 'net/http' in lib/gera.rb
- Remove duplicate requires from individual files
- Update ExmoFetcher spec to mock Net::HTTP.get

In Ruby 3.0+, Kernel#open with URI strings requires open-uri and
explicit URI.open call. This change prevents ENOENT errors when
fetching external rate APIs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ency

Refactored both fetchers to use RestClient directly instead of inheriting
from PaymentServices::Base::Client (which is defined in the host app).

Fixes #1650

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change lambda from ->(_job) to ->(*) in all jobs to handle
recurring tasks without arguments. SolidQueue calls the key lambda
with *arguments (job arguments), and for recurring tasks without
args: in config/recurring.yml, this passes 0 arguments.

Bump version to 1.2.0

Fixes: alfagen/mercury#1651

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Optimization for mercury issue #1691:
- DirectionRate contains pre-calculated rate_percent (commission)
- ExchangeRate contains is_enabled?, auto_rate? (direction settings)
- Instead of calling er.final_rate_percents (4 DB queries each time)
  use dr.rate_percent (already saved, 0 queries)
- includes loads all exchange_rates in 1 additional query

Before: N×M × 4 queries when displaying rates matrix
After: 2 queries (direction_rates + exchange_rates)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ry-includes

Add includes(:exchange_rate) to DirectionRatesRepository#build_matrix
When currency rate cannot be calculated for a pair, log a warning
instead of raising an error and notifying Bugsnag. This is expected
behavior when rate data is unavailable from sources.

- Replace raise Error with logger.warn and early return
- Change RateSource::RateNotFound from error to warn level
- Remove unused Error class
- Add tests for graceful handling

Fixes alfagen/mercury#1708

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fix: graceful handling для отсутствующих курсов валют
…ivejob

Migrate from Sidekiq to ActiveJob
Allow disabling direction_rate_history_intervals creation to save disk space
(~42GB on production). The table is only used for admin charts.

- Add enable_direction_rate_history_intervals config (default: true)
- Skip saving direction_rate_history_intervals when disabled
- Add helper method for controller to check status
- Show warning banner in view when collection is disabled

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…istory-intervals

Add enable_direction_rate_history_intervals config option
@dapi dapi closed this Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants