Sha256: 7d6cbb24416deddb6cfadf5750b039a4145da99e511d7df77648d903a2883158

Contents?: true

Size: 273 Bytes

Versions: 42

Compression:

Stored size: 273 Bytes

Contents

current_valuation = 0

Dashing.scheduler.every '2s' do
  last_valuation = current_valuation
  current_valuation = rand(100)

  Dashing.send_event('valuation', { current: current_valuation, last: last_valuation })
  Dashing.send_event('synergy',   { value: rand(100) })
end

Version data entries

42 entries across 23 versions & 1 rubygems

Version Path
dashing-rails-2.6.2 spec/dummy/app/jobs/sample.rb
dashing-rails-2.6.2 lib/generators/templates/jobs/sample.rb
dashing-rails-2.6.1 spec/dummy/app/jobs/sample.rb
dashing-rails-2.6.1 lib/generators/templates/jobs/sample.rb
dashing-rails-2.6.0 lib/generators/templates/jobs/sample.rb
dashing-rails-2.6.0 spec/dummy/app/jobs/sample.rb
dashing-rails-2.5.0 lib/generators/templates/jobs/sample.rb
dashing-rails-2.5.0 spec/dummy/app/jobs/sample.rb
dashing-rails-2.4.5 spec/dummy/app/jobs/sample.rb
dashing-rails-2.4.5 lib/generators/templates/jobs/sample.rb
dashing-rails-2.4.4 spec/dummy/app/jobs/sample.rb
dashing-rails-2.4.4 lib/generators/templates/jobs/sample.rb
dashing-rails-2.4.3 lib/generators/templates/jobs/sample.rb
dashing-rails-2.4.3 spec/dummy/app/jobs/sample.rb
dashing-rails-2.4.2 lib/generators/templates/jobs/sample.rb
dashing-rails-2.4.2 spec/dummy/app/jobs/sample.rb
dashing-rails-2.4.1 lib/generators/templates/jobs/sample.rb
dashing-rails-2.4.1 spec/dummy/app/jobs/sample.rb
dashing-rails-2.4.0 lib/generators/templates/jobs/sample.rb
dashing-rails-2.4.0 spec/dummy/app/jobs/sample.rb