Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
311 B

namespace :cf do
desc "Only run on the first application instance"
task on_first_instance: :environment do
# We expect this information to be always available or break otherwise
instance_index = JSON.parse(ENV["VCAP_APPLICATION"])["instance_index"]
exit(0) unless instance_index.zero?
end
end