Skip to content

Commit c64383a

Browse files
committed
Allow selecting tenant via TENANT env var
1 parent 4cac89c commit c64383a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/tasks/maintenance.rake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ namespace :maintenance do
4242
end
4343

4444
def hostnames(&block)
45-
Parallel.each(Tenant.all) do |tenant|
45+
tenants = ENV["TENANT"] ? [ ENV["TENANT"] ] : Tenant.all
46+
Parallel.each(tenants) do |tenant|
4647
Tenant.switch(tenant) do
4748
Current.org.hostnames.each do |hostname|
4849
block.call(hostname)

0 commit comments

Comments
 (0)