Last active
December 14, 2015 12:38
-
-
Save tomz/5087598 to your computer and use it in GitHub Desktop.
relatively efficient way to empty a bucket in Riak - using streaming API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# relatively efficient way to empty a bucket in Riak | |
def empty_bucket bucket_name | |
bucket = Riak.bucket(bucket_name) | |
bucket.keys do |keys| | |
keys.each do |key| | |
bucket.delete(key) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment