Multisite rake uploads task

Some uploads rake tasks have this pattern:

  RailsMultisite::ConnectionManagement.each_connection do |db|
    unless Discourse.store.external?
      puts "This task only works for external storage."
      exit 1
    end
    ...
    (actual code)
  end

This code exits the task completely when it encounters a non-external upload store.
Shouldn’t it just skip the connection with next , instead of exit ?

3 Likes

Technically … yes, but a multisite with a mix of internal and external storage is not really supported.

I guess we can just skip the loop here if you want to submit a PR.

1 Like