app/models/data_import.rb
def stuck?
    !%w(complete failure).include?(self.state) &&
    self.created_at < 5.minutes.ago            &&
    !running_import_ids.include?(self.id)
  end
# A stuck job shouldn't be finished, so it's state should not
# be complete nor failed, it should have been in the queue
# for more than 5 minutes and it shouldn't be currently
# processed by any active worker
A stuck job shouldn't be finished, so it's state should not
be complete nor failed, it should have been in the queue
for more than 5 minutes and it shouldn't be currently
processed by any active worker
A stuck job shouldn ' t be finished so it ' s state should not be complete nor failed it should have been in the queue for more than 5 minutes and it shouldn ' t be currently processed by any active worker
def stuck?
    !%w(complete failure).include?(self.state) &&
    self.created_at < 5.minutes.ago            &&
    !running_import_ids.include?(self.id)
  end
def stuck? ! %w( complete failure ) . include? ( self . state ) && self . created_at < 5 . minutes . ago && ! running_import_ids . include? ( self . id ) end
A stuck job shouldn't be finished, so it's state should not
be complete nor failed, it should have been in the queue
for more than 5 minutes and it shouldn't be currently
processed by any active worker
A stuck job shouldn ' t be finished so it ' s state should not be complete nor failed it should have been in the queue for more than 5 minutes and it shouldn ' t be currently processed by any active worker