title: Should I have a heroku worker dyno for poll a AWS SQS?
body: <p>Im confusing about where should I have a script polling an Aws Sqs inside a Rails application.</p>
  
  <p>If I use a thread inside the web app probably it will use cpu cycles to listen this queue forever and then affecting performance.</p>
  
  <p>And if I reserve a single heroku worker dyno it costs $34.50 per month. It makes sense to pay this price for it for a single queue poll? Or it's not the case to use a worker for it?</p>
  
  <p>The script code:</p>
  
  <blockquote>
    <p><strong>What it does</strong>: Listen to converted pdfs. Gets the responde and creates the object into a postgres database.</p>
  </blockquote>
  
  <pre><code>  queue = AWS::SQS::Queue.new(SQSADDR['my_queue'])    
    queue.poll do |msg|
       ...
       id = received_message['document_id']
       @document = Document.find(id)
       @document.converted_at = Time.now
       ...
    end
  </code></pre>
  
  <p>I need help!! Thanks</p>