Sha256: 64c16a7216b3cb4ec3d8255727d542bab887ad12405f9a1367a809ac17e9b97f

Contents?: true

Size: 525 Bytes

Versions: 7

Compression:

Stored size: 525 Bytes

Contents

Server.api :fast_insert, :source do |params,user|
  source = Source.load(params[:source_id],{:app_id=>APP_NAME,:user_id=>params[:user_id]})
  # if source does not exist create one for dynamic adapter
  source = Source.create({:name => params[:source_id]},{:app_id => APP_NAME,:user_id=>params[:user_id]}) unless source
  source_sync = SourceSync.new(source)
  timeout = params[:timeout] || 10
  raise_on_expire = params[:raise_on_expire] || false
  source_sync.fast_insert(params[:data], timeout,raise_on_expire)
  'done'
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rhoconnect-3.2.1 lib/rhoconnect/api/source/fast_insert.rb
rhoconnect-3.2.0 lib/rhoconnect/api/source/fast_insert.rb
rhoconnect-3.2.0.beta5 lib/rhoconnect/api/source/fast_insert.rb
rhoconnect-3.2.0.beta4 lib/rhoconnect/api/source/fast_insert.rb
rhoconnect-3.2.0.beta3 lib/rhoconnect/api/source/fast_insert.rb
rhoconnect-3.2.0.beta2 lib/rhoconnect/api/source/fast_insert.rb
rhoconnect-3.2.0.beta1 lib/rhoconnect/api/source/fast_insert.rb