开发者

Running a job on Heroku, continuously

开发者 https://www.devze.com 2023-02-03 04:25 出处:网络
I\'m creating a Twitter app in Rails which I\'m hosting on Heroku. For my app I have a background job that needs to continuously search Twitter.

I'm creating a Twitter app in Rails which I'm hosting on Heroku.

For my app I have a background job that needs to continuously search Twitter.

Unfortunately it seems like Cron jobs can only run at max once per hour, but t开发者_StackOverflow社区his wont do for my app I'm afraid. Does anyone have a solution to this problem?

Even better would be if I could use the TweetStream gem and have a connection open to Twitter all the time. But I'm suspecting there may be even greater difficulties with this. Am I wrong?

Thanks!


Heroku supports DelayedJob to run background processes...

And for the fee: "Workers are charged at the same rate as Dynos: $0.05 per hour, prorated to the second. Unlike Dynos, Workers are starting with the first worker. For example, an application with 3 workers for 3 hours will be charged $0.15 for each hour the workers are running."

http://docs.heroku.com/delayed-job

0

精彩评论

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