简体   繁体   English

Ruby on Rails作业调度选项

[英]Ruby on Rails Job Scheduling Options

I'm going to try again after my hiccup last night. 昨晚打h后,我将再次尝试。 The following is what I'm trying to find a solution to: After conditions in my controller are met, I need to run a job five minutes later. 以下是我要寻找的解决方案:满足控制器中的条件后,我需要在五分钟后运行作业。 This is for a lottery website for a mmo. 这是针对mmo的彩票网站。 After a ticket is sold, based on specific conditions(player amount met, amount of lottery item met), players have five minutes to buy a tickets. 售出门票后,根据特定条件(满足玩家数量,满足彩票项目的数量),玩家有五分钟的时间购买门票。 After five minutes, I need to pick random unique ticket numbers and award winners tokens. 五分钟后,我需要随机选择唯一的彩票号码和获奖者代币。 Right now I run this manually. 现在,我手动运行它。 I'm looking for a solution that I can schedule in my controller to run five minutes later. 我正在寻找可以安排在控制器中运行五分钟后解决的解决方案。

I have tried delayed_job which I cannot get to work locally on a mac. 我尝试了delay_job,但我无法在Mac上本地工作。 Ruby on Rails Delayed Job Local Wont Run I have tried iron.io paid solution with no luck. Ruby on Rails延迟了工作,导致本地无法正常运行我尝试了iron.io付费解决方案,但是没有运气。

Please offer suggestions with possible tutorials. 请提供可能的教程建议。

Thanks. 谢谢。

Sidekiq is great and you should try it first. Sidekiq 很棒 ,您应该先尝试一下。

https://github.com/mperham/sidekiq https://github.com/mperham/sidekiq

Mike Perham, the lead author, is a terrific programmer and he writes about comparisons among Sidekiq, Resque, Delayed Job. 主要作者Mike Perham是一位了不起的程序员,他撰写了Sidekiq,Resque和Delayed Job之间的比较。

Worth reading his blog post about it here: 值得在这里阅读有关它的博客文章:

http://www.mikeperham.com/2011/05/04/background-processing-vs-message-queueing/ http://www.mikeperham.com/2011/05/04/background-processing-vs-message-queueing/

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

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