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
func (c *Copier) CopyKey(bucket string, key string) bool { | |
obj, err := c.SrcRiak.FetchObject(bucket, key) | |
if err != nil { | |
log.Printf("Unable to get /%v/%v Error:%v", bucket, key, err.Error()) | |
return false | |
} | |
log.Printf("\n\nSource:\n") | |
log.Printf("\n/buckets/%v/keys/%v\n", bucket, key) | |
log.Println(string(obj.GetContent()[0].GetValue())) | |
log.Println(obj.GetContent()[0].GetIndexes()) |
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
Africa/Abidjan | |
Africa/Accra | |
Africa/Addis_Ababa | |
Africa/Algiers | |
Africa/Asmara | |
Africa/Asmera | |
Africa/Bamako | |
Africa/Bangui | |
Africa/Banjul | |
Africa/Bissau |
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
>> RIAK_HTTP_CLIENT.bucket("test_bucket").get_index("c_bin","test") | |
=> ["my_token"] | |
>> RIAK_PBC_CLIENT.bucket("test_bucket").get_index("c_bin","test") | |
NoMethodError: undefined method `length' for #<Riak::Bucket {test_bucket}> | |
from /Users/graphex/.rvm/gems/jruby-1.7.2@gemset/gems/beefcake-0.3.7/lib/beefcake/buffer/encode.rb:108:in `append_string' | |
from org/jruby/RubyBasicObject.java:1665:in `__send__' | |
from /Users/graphex/.rvm/gems/jruby-1.7.2@gemset/gems/beefcake-0.3.7/lib/beefcake/buffer/encode.rb:13:in `append' | |
from /Users/graphex/.rvm/gems/jruby-1.7.2@gemset/gems/beefcake-0.3.7/lib/beefcake.rb:102:in `encode!' | |
from org/jruby/RubyArray.java:1613:in `each' | |
from /Users/graphex/.rvm/gems/jruby-1.7.2@gemset/gems/beefcake-0.3.7/lib/beefcake.rb:90:in `encode!' |
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
class Sitrep | |
include Celluloid | |
def initialize | |
log_sitrep | |
end | |
def log_sitrep | |
Celluloid.logger.debug "\nActors:\n" + (Celluloid::Actor.all.to_set.map { |a| | |
retval = nil |
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
require 'celluloid' | |
class SayActor | |
include Celluloid | |
VOICES = %w(Daniel Emily Fiona Jill Karen Lee Moira Samantha Sangeeta Serena Tessa Tom) | |
def initialize(voice=nil) | |
@voice = voice.blank? ? VOICES.shuffle[0] : voice | |
end | |
def say(text) |
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
NoMethodError: undefined method `alive?' for #<Celluloid::Actor:0x007f9cb9dd93b8> | |
/Users/graphex/.rvm/gems/ruby-1.9.3-p194@cellar/gems/celluloid-0.12.0/lib/celluloid.rb:245:in `alive?' | |
/Users/graphex/Documents/Client/Graphex/Cellar/lib/director.rb:36:in `puts_env_info' | |
/Users/graphex/Documents/Client/Graphex/Cellar/lib/director.rb:32:in `say_pool' | |
/Users/graphex/.rvm/gems/ruby-1.9.3-p194@cellar/gems/celluloid-0.12.0/lib/celluloid/calls.rb:57:in `dispatch' | |
/Users/graphex/.rvm/gems/ruby-1.9.NoMethodError: undefined method `alive?' for #<Celluloid::Actor:0x007f9cb9dd93b8> | |
from /Users/graphex/.rvm/gems/ruby-1.9.3-p194@cellar/gems/celluloid-0.12.0/lib/celluloid.rb:245:in `alive?' | |
from /Users/graphex/Documents/Client/Graphex/Cellar/lib/director.rb:36:in `puts_env_info' | |
from /Users/graphex/Documents/Client/Graphex/Cellar/lib/director.rb:32:in `say_pool' | |
from /Users/graphex/.rvm/gems/ruby-1.9.3-p194@cellar/gems/celluloid-0.12.0/lib/celluloid/calls.rb:57:in `dispatch' |
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
require 'riak/client' | |
require 'celluloid' | |
require 'airbrake' | |
class RiakClientActor | |
include Celluloid | |
def initialize() | |
#@statsd = Stat::get_new | |
@rc = Riak::Client.new(APP_CONFIG[:riak]) |
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
#!/usr/bin/env ruby | |
# | |
# Worker Pool example | |
# | |
# Looking for a way to light up all your cores? This is it! Celluloid::Worker | |
# lets you create fixed-sized thread pools for executing expensive background | |
# processing tasks. | |
PARALLEL_RUBIES = %w(jruby rbx) |