Problem with a job (scheduler caught exception)
Author: LKLGCreated Nov 5, 2013Updated Jan 16, 2018
I have a job to get data from a mysql-Database in the Rickshawgraph widget (https://gist.github.com/jwalton/6614023). However, the job does not run. Log:
================================================================================
scheduler caught exception:
tried to create Proc object without a block
/var/lib/gems/1.9.1/gems/sinatra-1.4.3/lib/sinatra/base.rb:1526:in `define_method'
/var/lib/gems/1.9.1/gems/sinatra-1.4.3/lib/sinatra/base.rb:1526:in `generate_method'
/var/lib/gems/1.9.1/gems/sinatra-1.4.3/lib/sinatra/base.rb:1535:in `compile!'
/var/lib/gems/1.9.1/gems/sinatra-1.4.3/lib/sinatra/base.rb:1515:in `route'
/var/lib/gems/1.9.1/gems/sinatra-1.4.3/lib/sinatra/base.rb:1345:in `get'
/var/lib/gems/1.9.1/gems/sinatra-1.4.3/lib/sinatra/base.rb:1917:in `block (2 levels) in delegate'
/opt/dashing/jobs/otrs.rb:113:in `block (2 levels) in <top (required)>'
/opt/dashing/jobs/otrs.rb:112:in `each'
/opt/dashing/jobs/otrs.rb:112:in `block in <top (required)>'
/var/lib/gems/1.9.1/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in `call'
/var/lib/gems/1.9.1/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in `trigger_block'
/var/lib/gems/1.9.1/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in `block in trigger'
/var/lib/gems/1.9.1/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `call'
/var/lib/gems/1.9.1/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'
================================================================================
So i've looked at the script, but i doesn't find the problem. "(0..7).each do |i|" is line 112
series = [
{
name:"Erstellte Tickets",
data: []
},
{
name:"Geschlossene Tickets",
data: []
}
]
z = 0
(0..7).each do |i|
z = i - 1
series[0][:data][z] = {x:prevdays(i,0,1), y:get(1)[0][i]}
series[1][:data][z] = {x:prevdays(i,0,1), y:get(1)[0][i]}
endSo i tested the code with irb and there is no error or problem and everything is as it should. So my question. Where is the Problem?
And sorry for my english..
Source: Shopify/dashing