Skip to content

Conversation

@paderinandrey
Copy link

image

batch.each do |order|
# Оптимизировать тут
Parallel.map(batch, in_threads: batch.size) do |order|
response = send_to_external_service
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ещё запросы можно через gem 'async' сделать - будет быстрее
и батч стоит сделать поменьше, так как потоки дорого создавать, 4 например

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.

2 participants