ruby-on-railsrufus-scheduler

In rufus-scheduler, does the job rollback to initial state if the process thread is killed


I am using rufus-scheduler for scheduling some tasks for my Rails application. In case of a time-intensive job scheduled, does the job rollback to its initial state, incase the job thread is killed abruptly, in the middle of a job execution?


Solution

  • No.

    If you look at the source code of rufus-scheduler, you will notice that there are no mentions of Rails, rollbacks or transactions in it.

    You are in charge, you have to factor that in by yourself. Rufus-scheduler is Rails / Sinatra / Sequel / Active-Record / etc agnostic. It's just a Ruby library.