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.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/templates/project/jobs/sample.rb b/templates/project/jobs/sample.rb
new file mode 100644
index 0000000..1fe008d
--- /dev/null
+++ b/templates/project/jobs/sample.rb
@@ -0,0 +1,13 @@
+current_valuation = 0
+current_karma = 0
+
+SCHEDULER.every '2s' do
+ last_valuation = current_valuation
+ last_karma = current_karma
+ current_valuation = rand(100)
+ current_karma = rand(200000)
+
+ send_event('valuation', { current: current_valuation, last: last_valuation })
+ send_event('karma', { current: current_karma, last: last_karma })
+ send_event('synergy', { value: rand(100) })
+end \ No newline at end of file