contollers/jobs.rb
post '/job/:id/delete' do
...
Minicron::Hub::Job.transaction do
Try and delete the job
Minicron::Hub::Job.destroy(params[:id])
...
end
Minicron::Hub::Job.destroy(params[:id]) should be executed at end of transaction,
otherwise @job.schedules will be [], so the delete_job will be unused
I've just tested on my local copy of what is soon to be 0.8.1 and I cannot reproduce this issue, it seems to be delete the job and schedule as expected.
contollers/jobs.rb post '/job/:id/delete' do ... Minicron::Hub::Job.transaction do
Try and delete the job
... end
Minicron::Hub::Job.destroy(params[:id]) should be executed at end of transaction, otherwise @job.schedules will be [], so the delete_job will be unused