My app is using Afterburner because I need the gem active_elastic_job to send sqs messages to my queue. Those messages are processed by an Elastic Beanstalk worker.
Sometimes I need to manually send messages (for test purpose) to the queue and I thought about creating a specific job in my Afterburner app that sends a message to the queue.
What happens with Jets Afterburner mode is that it generates a wrapper Jets application and then proxies requests from the Jets app to the Rails app. This was a design choice.
As a part of the Jets application generation process, it’ll merge in the files from the .jets folder. So you could create a .jets/app/jobs/hard_job.rb. Again, a little bit hacky. Haven’t tested in a while, but it should work.
I created a .jets/app/jobs/ping_job.rb file and I see it in my lambda functions under app/job folder.
But only the following lambda functions were created after deploy :
I see. The path structure is confusing since .jets/app contains the wrapper Jets app. So I renamed it to .jets/project in v1.9.23 in PR https://github.com/tongueroo/jets/pull/300 This will be less confusing
v1.9.23 and above: .jets/project/app/jobs/ping_job.rb
v1.9.22 and below: .jets/app/app/jobs/ping_job.rb # the double app/app is pretty confusing
Added an error message let users know to rename the folder to .jets/project in newer versions also.