I'm not 100% certain that this is a bug in torquebox, but I can't see where else the bug could possibly be, and I'm pretty sure it is a bug.
I've setup a very basic background job class, and to test it currently just outputs messages to the log. Below is the class I've setup
To launch the job, I am calling
I have not setup a job in the torquebox description, however this seems to be working as expected, and the job is being scheduled and is runnning at the correct time.
For the above job, I expect to get the following output in the console
Unfortunately, the output I am actually getting is
Whilst it is almost exactly what I expect, the retrieval of the property value fails.
There are no errors returned, I simply don't retrieve a value.
To test if this was an error in my own code, I opened a rails console and manually tested it by doing the following
Nice and simple. When this runs, I receive the output I expect and the value is returned correctly.
The only difference I can see here is that I am calling it directly from a rails console rather than Torquebox invoking it.
The only solution that I could find that made it work, was to change my initialize method to the following
Obviously this is quite a horrible solution just to retrieve a single key from a hash.
Please let me know if this is not in fact a bug in Torquebox and I've completely missed something, but I don't see where else the problem could lie.
I am running Torquebox 3.1.0, with Rails 4 and jRuby 1.7.11