lib/base_que_job.rb
# Before a job executes, check if onother instance of the same job is busy.
Before a job executes, check if onother instance of the same job is busy.
Before a job executes check if onother instance of the same job is busy .
def lock_single_instance
    return if single_instance_job.nil?
    retry_in(30) if File.exist?(lock_file)
    FileUtils.touch(lock_file)
  end
def lock_single_instance return if single_instance_job . nil? retry_in ( 30 ) if File . exist? ( lock_file ) FileUtils . touch ( lock_file ) end
Before a job executes, check if onother instance of the same job is busy.
Before a job executes check if onother instance of the same job is busy .