일부 uploads rake 태스크에는 다음과 같은 패턴이 있습니다:
RailsMultisite::ConnectionManagement.each_connection do |db|
unless Discourse.store.external?
puts "This task only works for external storage."
exit 1
end
...
(actual code)
end
이 코드는 외부가 아닌 업로드 스토어를 만나면 태스크를 완전히 종료합니다.
exit 대신 next 로 해당 연결을 건너뛰는 것이 더 적절하지 않나요?