admin管理员组文章数量:1300203
We have a Rails API container and execute some short-running batch jobs using the following commands:
- bundle exec rake execute[NotifyAction] RAILS_ENV=staging
- bundle exec rails runner Emails::CheckingTask.execute RAILS_ENV=staging
Currently, we use the docker run
command to execute these tasks on EC2, but now we want to run them in an AWS Lambda container.
I found that we need to use the AWS Lambda Ruby Runtime Interface Client (RIC) for this,
but I am unsure how to run bundle exec rake execute
and bundle exec rails runner
inside the Lambda handler function.
Has anyone successfully implemented this? I am not a Ruby on Rails developer, so any advice would be greatly appreciated.
I tried using the open3
gem to execute these commands from the handler function but encountered multiple errors.
本文标签: amazon web servicesHow to run RailsRake Tasks in an AWS Lambda ContainerStack Overflow
版权声明:本文标题:amazon web services - How to run RailsRake Tasks in an AWS Lambda Container - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741657595a2390848.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论