Skip to content

Instantly share code, notes, and snippets.

@Vincanote
Created September 9, 2018 10:23
Show Gist options
  • Save Vincanote/81100a5858e60925e202ebe321631a10 to your computer and use it in GitHub Desktop.
Save Vincanote/81100a5858e60925e202ebe321631a10 to your computer and use it in GitHub Desktop.
Ruby版pub-relayからCrystal版pub-relay移行用
#!/usr/bin/env ruby
require_relative './config/boot'
require_relative './config/environment'
redis_url = 'redis://127.0.0.1:6379'
redis = Redis.new(url: redis_url)
::Subscription.all.each do |subscription|
redis.hset("subscription:#{subscription.domain}", "inbox_url", subscription.inbox_url)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment