开发者

Amazon's SQS with Rails app

开发者 https://www.devze.com 2023-03-04 14:01 出处:网络
I am implementing Amazon\'s SQS service in My Rails application. I am trying to make a Poller which will continuously monitor the incoming Queue.

I am implementing Amazon's SQS service in My Rails application.

I am trying to make a Poller which will continuously monitor the incoming Queue.

What I want to do is when I start my rails server the Poller should 开发者_运维百科be start and start monitoring the incoming queue.

Which is the best way to implement this code in my rails app?

Your suggestion will appropriate me.


You will have to write either a rake task that is started periodically by cron or you can write a daemon that runs continuously in the background.

Writing a rake task is easy, this should get you started: http://nubyonrails.com/articles/rake-rake-rake-your-boat

Here is a Railscast that should give you some directions for writing a daemon: http://railscasts.com/episodes/129-custom-daemon

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号