Skip to content

Instantly share code, notes, and snippets.

@exviva
Created January 25, 2017 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save exviva/d22b83513a3700794ccb86e6ddb083fc to your computer and use it in GitHub Desktop.
Save exviva/d22b83513a3700794ccb86e6ddb083fc to your computer and use it in GitHub Desktop.
Shameless initializer
# config/initializers/rate_store.rb
RateStore = Shameless::Store.new(:rate_store) do |c|
c.partition_urls = [
ENV['RATE_STORE_DATABASE_URL_0'],
ENV['RATE_STORE_DATABASE_URL_1']
]
# total number of shards across all partitions
c.shards_count = 512
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment