summaryrefslogtreecommitdiff
path: root/templates/project/jobs/convergence.rb
blob: f66b6a509a72326f2df94f32b7864fe40185442f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
points = []
(1..10).each do |i|
  points << { x: i, y: rand(50) }
end
last_x = points.last[:x]

SCHEDULER.every '2s' do
  points.shift
  last_x += 1
  points << { x: last_x, y: rand(50) }

  send_event('convergence', points: points)
end