summaryrefslogtreecommitdiff
path: root/templates/project/jobs/sample.rb
diff options
context:
space:
mode:
Diffstat (limited to 'templates/project/jobs/sample.rb')
-rw-r--r--templates/project/jobs/sample.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/templates/project/jobs/sample.rb b/templates/project/jobs/sample.rb
index 54a0e60..2314dc2 100644
--- a/templates/project/jobs/sample.rb
+++ b/templates/project/jobs/sample.rb
@@ -1,5 +1,9 @@
-SCHEDULER.every '5s' do
- send_event('synergy', { value: (rand * 1024).floor })
- send_event('convergence', { value: (rand * 1024).floor })
- send_event('paradigm_shift', { value: (rand * 1024).floor })
+current_valuation = 0
+
+SCHEDULER.every '2s' do
+ last_valuation = current_valuation
+ current_valuation = rand(100)
+
+ send_event('valuation', { current: current_valuation, last: last_valuation })
+ send_event('synergy', { value: rand(100) })
end \ No newline at end of file