Skip to content

Instantly share code, notes, and snippets.

@blasterpal
Created October 4, 2012 14:32
Show Gist options
  • Select an option

  • Save blasterpal/3833891 to your computer and use it in GitHub Desktop.

Select an option

Save blasterpal/3833891 to your computer and use it in GitHub Desktop.
Backup Sidekiq queue entries to disk
@conn = Sidekiq.redis {|conn| @conn = conn}
@conn.smembers('queues').each {|q|
File.open("/home/rails/#{q}_sidekiq.dump",'w') {|f|
l = @conn.lrange("queue:#{q}",0,-1)
f << l
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment