title: How to kill sidekiq job in Rails 4 with ActiveJob
body: <p>Let's say we have test job:</p>
  
  <pre><code>class TestJob &lt; ActiveJob::Base
    queue_as :default
  
    def perform(video)
      video.process
    end
  end
  </code></pre>
  
  <p>After it we run <code>bundle exec sidekiq start</code></p>
  
  <p>And run in new terminal window in rails console</p>
  
  <p><code>Video.first.pending!; TestJob.perform_later(Video.first)</code></p>
  
  <p>Job is running, ffmpeg is on background, everything is fine, but according to <a href="https://github.com/mperham/sidekiq/wiki/API" rel="nofollow">official sidekiq wiki docs</a> I try:</p>
  
  <pre><code>require 'sidekiq/api'
  Sidekiq::Queue.new
  =&gt; #&lt;Sidekiq::Queue:0x00000006406978 @name="default", @rname="queue:default"&gt;
  
  Sidekiq::Queue.new.each {|job| puts job}
  =&gt; nil
  Sidekiq::Queue.new.size
  =&gt; 0
  ss = Sidekiq::ScheduledSet.new
  =&gt; #&lt;Sidekiq::ScheduledSet:0x000000064a4330 @_size=0, @name="schedule"&gt;
  ss.size
  =&gt; 0
  </code></pre>
  
  <p>Why there is no jobs? The job is running successfully ( I see it also in first window where sidekiq starts, but I can't see and delete  it in rails console )</p>
  
  <p>I am using Ubuntu 14 if it helps</p>
  
  <p>With best regards, Ruslan.</p>
  
  <p><strong>UPD:</strong>
  It looks that
  <code>ps = Sidekiq::ProcessSet.new; ps.each(&amp;:quiet!)</code>
  works
  , but it doesn't stop my ffmpeg process this part of code internally in process: </p>
  
  <pre><code>cmd = "ffmpeg -i #{input_file.shellescape} #{options} -threads 0 -y #{self.path + outfile}"
  pid = spawn(cmd, :out =&gt; output_file, :err =&gt; output_file)
  Process.wait(pid)
  </code></pre>
  
  <p>How to stop it?</p>