[list]
Best place for BackgrounDRb documentation is the README file that comes with the plugin. Read it thoroughly before going anywhere else for documentation.
When passing arguments from Rails to BackgrounDRb workers, don’t pass huge ActiveRecord objects. Its asking for trouble. You can easily circumvent the situation by passing id of AR objects.
Its always a good idea to run trunk version rather than older tag releases.
To debug backgroundrb problems. Its always a good idea to start bdrb in foreground mode by skipping ’start’ argument while starting the bdrb server. After that, you should fire rails console and try invoking bdrb tasks from rails console and find out whats happening. John Yerhot has posted an excellent write up about this, here
Whenever you update the plugin code from svn, don’t forget to remove old backgroundrb script and run :
rake backgroundrb:setup
When deploying the plugin in production, please change backgroundrb.yml, so as production environment is loaded in backgroundrb server. You should avoid keeping backgroundrb.yml file in svn. Rather, you should have a cap task that generates backgroundrb.yml on production servers.
When you are processing too many tasks from rails, you should use inbuilt thread pool, rather than firing new workers
BackgrounDRb needs Ruby >= 1.8.5
When you are starting a worker using
MiddleMan.new_worker()
from rails and using a job_key to start the worker ( You must use unique job keys anyways, if you want more than one instance of same worker running at the same time ), you must always access that instance of worker with same job key. Thats all MiddleMan methods that will invoke a method on that instance of worker must carry job_key as a parameter. For example:
session[:job_key] = MiddleMan.new_worker(:worker => :fibonacci_worker, :job_key => 'the_key', :data => params[:input])
MiddleMan.send_request(:worker => :fibonacci_worker, :worker_method => :do_work, :data => params[:input],:job_key => session[:job_key])
Omitting the job_key in subsequent calls will be an error, if your worker is started with a job_key.
[/list]
分享到:
相关推荐
Microservices Best Practises for Java Microservices Best Practises for Java
Ansible-ansible-best-practises.zip,一种项目结构,它概述了如何使用可靠的最佳实践的一些最佳实践,ansible是一个简单而强大的自动化引擎。它用于帮助配置管理、应用程序部署和任务自动化。
《C++最佳实践》一书由Jason Turner撰写,旨在为读者提供45条左右的简单规则和具体的行动项,以助于编写更好的C++代码。这本书通过Lean Publishing的模式出版,这是一种轻量级的工具和多次迭代以获得读者反馈,直到...
### C++最佳实践:二叉搜索树(Binary Search Tree, BST)操作与遍历 #### 一、二叉搜索树的基本概念 二叉搜索树(Binary Search Tree,简称BST)是一种特殊的二叉树,它具有一个重要的性质,即**BST性质**: ...
ASM最佳实践范例 交通转移 交通管理 流量解码 安全的 观察 网格化 http_hybrid_demo http_workload_blue_green_demo vm_tracing_demo
Umbraco v7最佳实践的混合框架 带有许多示例的Umbraco框架。 它在SQL CE上运行,但是也可以使用SQL Server .bak文件。 ... 该视频介绍了适用于Umbraco v7的混合框架的所有新功能以及如何使用它们: : ...
We start by giving you an overview of the guiding principles in Kubernetes design and show you the best practises in the fields of security, high availability, and cluster federation. You will ...
We start by giving you an overview of the guiding principles in Kubernetes design and show you the best practises in the fields of security, high availability, and cluster federation. You will ...
4. **错误处理**:在《WSO2 ESB by Example - Best practises for error handling on the WSO2 ESB》中,详细阐述了如何在ESB中设计和实现错误处理策略,以保证系统的健壮性。这包括异常捕获、重试机制、故障转移和...
### Oracle DataGuard 实践指引 #### 一、引言 Oracle Data Guard 是一款为企业级数据库提供高可用性和灾难恢复解决方案的强大工具。它通过在主数据库(Primary Database)和一个或多个辅助数据库(Standby ...
Terraform最佳做法 :globe_with_meridians: 适用于AWS用户的Terraform最佳实践。 有什么问题或建议吗? 提出问题以寻求帮助。 指数 适用于terraform版本0.11及更低版本的README已重命名为 使用var-file运行...
谓语可以是简单的动词(如"He practises running"中的"practises"),也可以是动词短语(如"We usually listen to the music"中的"listen to")。此外,复合谓语包括情态动词或助动词加动词原形(如"You may keep ...
- 语法填空部分进一步巩固了非谓语动词的用法,如 `meeting`, `running`, `pretending` 等,同时涉及动词短语的使用,如 `enjoy listening to music`,`practises playing the violin` 等。 以上就是对所提供的...
3. 填词题中,如frightened(害怕的)和practises(练习)等,测试了学生对单词词性和语境应用的理解。 通过这些练习,学生可以巩固初一阶段所学的英语基础知识,提高英语阅读、写作和听力水平。暑假生活指导不仅是...
6. 练习 - practises (第三人称单数形式) 7. 借 - borrow (情态动词后用原形) 8. 花费 - spends (第三人称单数形式),做 - doing (动名词) C. 根据首字母填空: 1. 星期三 - Tuesday 2. 一起 - together 3. 该...的...
- 第六题的"practises"表示她每天练习弹钢琴。 - 第七题的"fails"表示女孩在中文考试中再次不及格。 - 第八题的"came true"是梦想成真的固定搭配。 - 第九题的"attracts"表示吸引,与水运动对游客的吸引力有关。...
建立使用点子pip install ansible-review从来源# Install dependency https://github.com/willthames/ansible-lintgit clone https://github.com/willthames/ansible-reviewexport PYTHONPATH=$PYTHONPATH:`pwd`/...
25. 练习(always practises):经常性地练习,表示习惯性的动作。 26. 做了(did):动词过去式,表示过去完成的事情。 27. 购物(is shopping):与with并列的主语一起构成现在进行时。 28. 听到(heard):动词...
5. enjoy, practise, finish, mind, spend等动词后面接动名词,如:“I enjoy reading books.”、“She practises playing the piano every day.” 6. 动词stop, forget, remember, regret, like等有时可以接不定式...