jamesrwhite / minicron

🕰️ Monitor your cron jobs
GNU General Public License v3.0
2.34k stars 154 forks source link

schedules won't be deleted when delete job #160

Closed 331299 closed 8 years ago

331299 commented 8 years ago

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

jamesrwhite commented 8 years ago

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.

331299 commented 8 years ago

yes, I have found my problem is the same with #158