我怎么可以运行Resque在AWS弹性魔豆Rails的后台作业? [英] How can I run Rails background jobs with Resque on AWS Elastic Beanstalk?

查看:258
本文介绍了我怎么可以运行Resque在AWS弹性魔豆Rails的后台作业?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 AWS弹性魔豆的平台,这是运行一个EC2上运行我的Rails应用程序例如带自动缩放和放大器;弹性负载平衡。

I am running my rails app on the AWS Elastic Beanstalk platform, which is running a single EC2 instance with Auto Scaling & Elastic Load Balancing.

我不知道怎么办好 resque 的delayed_job 或的 sidekicq 或一些其他的解决方案的弹性魔豆后台作业。

I'm wondering how to run resque, delayed_job or sidekicq or some other solution for background jobs on Elastic Beanstalk.

什么是弹性魔豆?

推荐答案

启动/停止/启动后台作业可以通过初始化脚本来执行这些任务的最佳方式。你可以有这些初始化脚本作为触发的服务的当实例启动。更多关于自定义ElasticBeanstalk集装箱服务<一href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-services"相对=nofollow>这里。

Best way to start/stop/restart background jobs could be via init scripts for these tasks. You could have these init scripts triggered as services when instances are launched. More about Customizing ElasticBeanstalk containers for services here.

一旦这样做,你可以通过创建实例的AMI,然后启动实例了这一习俗的急性心肌梗死自动缩放冻结你的初始化脚本。

Once done, you could freeze your init scripts by creating an AMI of your instance and then launching instances out of this custom AMI with auto-scaling.

希望这有助于。

这篇关于我怎么可以运行Resque在AWS弹性魔豆Rails的后台作业?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆