lib/sidekiq/scheduler.rb
# Pushes the job into Sidekiq if not already pushed for the given time
#
# @param [String] job_name The job's name
# @param [Time] time The time when the job got cleared for triggering
# @param [Hash] config Job's config hash
Pushes the job into Sidekiq if not already pushed for the given time
Pushes the job into Sidekiq if not already pushed for the given time
def idempotent_job_enqueue(job_name, time, config)
        registered = register_job_instance(job_name, time)
        if registered
          logger.info "queueing #{config['class']} (#{job_name})"
          handle_errors { enqueue_job(config) }
          remove_elder_job_instances(job_name)
        else
          logger.debug { "Ignoring #{job_name} job as it has been already enqueued" }
        end
      end
def idempotent_job_enqueue ( job_name , time , config ) registered = register_job_instance ( job_name , time ) if registered logger . info "queueing #{config['class']} (#{job_name})" handle_errors { enqueue_job ( config ) } remove_elder_job_instances ( job_name ) else logger . debug { "Ignoring #{job_name} job as it has been already enqueued" } end end
Pushes the job into Sidekiq if not already pushed for the given time
Pushes the job into Sidekiq if not already pushed for the given time
job_name
time
config
config Job's config hash
config Job ' s config hash