简体   繁体   English

如何将Resque插件与Rails 2.3.5应用程序集成?

[英]How to integrate Resque plugin with rails 2.3.5 application?

I am trying to integrate my rails app with Resque plugin but in the doc it is not given that where should I write the code and how to use that code when running application. 我正在尝试将Rails应用程序与Resque插件集成在一起,但是在文档中并未给出我应该在哪里编写代码以及在运行应用程序时如何使用该代码。 May be it is not understandable for me. 可能对我来说这是无法理解的。

It would be helpful for me if any one explain it with an example application. 如果有人通过示例应用程序进行解释,这将对我有所帮助。

Thanks in advance. 提前致谢。

您可以按照railscasts中指定的步骤进行操作

You just need add the gem in your config.gem 'resque' 您只需要在config.gem'resque'中添加gem即可

After you can call by Resque.enqueue(xxx). 之后,您可以通过Resque.enqueue(xxx)进行呼叫。 All class call by Resque queue need to be load. 需要加载所有由Resque队列进行的类调用。 You can add it on app/worker directory and add it in load_path. 您可以将其添加到app / worker目录中,并将其添加到load_path中。 Or put in lib and use the autoloading stuff. 或放入lib并使用自动加载的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM