Skip to content

Instantly share code, notes, and snippets.

@jmoren
Created June 8, 2012 13:42
Show Gist options
  • Save jmoren/2895668 to your computer and use it in GitHub Desktop.
Save jmoren/2895668 to your computer and use it in GitHub Desktop.
BackgrounRb
MiddleMan.worker(:fast_import_worker)
=> #<BackgrounDRb::RailsWorkerProxy:0x3b6d9a8 @worker_key=nil, @middle_man=#<BackgrounDRb::ClusterConnection:0x32b84e8 @request_count=1, @bdrb_servers=[#<struct #<Class:0x32a7ff8> ip="0.0.0.0", port=11006>], @round_robin=[0], @last_polled_time=Fri Jun 08 06:25:06 -0700 2012, @disconnected_connections={}, @backend_connections=[#<BackgrounDRb::Connection:0x32a7b98 @mutex=#<Mutex:0x32a7b48>, @server_ip="0.0.0.0", @connection_status=true, @cluster_conn=#<BackgrounDRb::ClusterConnection:0x32b84e8 ...>, @server_port=11006>]>, @worker_name=:fast_import_worker, @tried_connections=[]>
>> MiddleMan.worker(:fast_import_worker).csv_local
=> "dummy_result"
>> MiddleMan.worker(:fast_import_worker).async_csv_local
=> nil
>> MiddleMan.worker(:fast_import_worker).async_csv_local(:arg => {:import_type => 7, :list_name => "probando" })
=> nil
>> MiddleMan.worker(:fast_import_worker).csv_local(:arg => {:import_type => 7, :list_name => "probando" })
=> "dummy_result"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment