title: Prevent duplicate ActiveJob being scheduled
body: <p>I have a Rails app that queries an external webservice to update records.
  I want to continue polling the web service until the user session expires.</p>
  
  <p>Currently I create an ActiveJob in the show action for the record I want updated.</p>
  
  <p>In the ActiveJob I reschedule it using</p>
  
  <pre><code>  self.class.set(wait: 60.seconds).perform_later(record_id)
  </code></pre>
  
  <p>The problem is that if the user goes to the show action again, it will create another ActiveJob.  </p>
  
  <p>Is there anyway to prevent duplicate jobs from being created?</p>