AD
Size: a a a
AD
IM
NG
w
NO
RA
VV
RA
O
let(:first_tp) { build(:tariff_plan, service_type: service_type, service_code: service_code, reseller_code: 'default', check_status: true) }
let(:second_tp) { build(:tariff_plan, service_type: 'mock_type_2', service_code: service_code, reseller_code: 'default', check_status: true) }
let(:tariff_plans) { [first_tp, second_tp].flatten }
FactoryBot.rewind_sequences
, чтобы точно знать, что отсчёт пошёл с нуля?AA
let(:first_tp) { build(:tariff_plan, service_type: service_type, service_code: service_code, reseller_code: 'default', check_status: true) }
let(:second_tp) { build(:tariff_plan, service_type: 'mock_type_2', service_code: service_code, reseller_code: 'default', check_status: true) }
let(:tariff_plans) { [first_tp, second_tp].flatten }
FactoryBot.rewind_sequences
, чтобы точно знать, что отсчёт пошёл с нуля?а
threads = Array.new(15, Thread.new do end)
loop do
threads.map! do |thread|
if thread.alive?
thread
else
Thread.new do
end
end
end
sleep 0.00001
end
а
а
а
IS
O
O
O
queue.pop
и ждёт пока какой-нибудь из тредов не отправит туда что-нибудь, после чего убирает тред из массива и добавляет туда новый.