I have a Rails application hosted on Heroku that needs to import data weekly. The task is performed by administrators and takes about 1-2 minutes to run (calculation time). On Heroku, quests that take 30 seconds to complete . Heroku recommends priority work - however, paying $ 36.00 per month (price per employee) for 8 minutes of calculation time does not seem to work. A few questions:
Thank!
You can check out HireFire .
HireFire "" "" ( "" ) . , HireFire () . , () . , , ( ).
, (, , ).
, .
? , - . " " , , .
, , -, . cron Addon ( ). lib/tasks/cron.rake.
lib/tasks/cron.rake
task :cron => :environment do if Time.now.strftime('%w').to_i == 0 # run every sunday puts "Importing..." #... run import puts "done." end end
, , .
, API- heroku, .
After testing, it turned out that the timeout does not prevent the completion of long tasks (only the results are displayed to the user). Ended email notification and timeout permission. I looked at the thread request, but the support in Rails seems fluffy.
Source: https://habr.com/ru/post/1753851/More articles:How can I use class_getProperty in iPad? (Not a simulator) - objective-cGlobal exception handling in .NET? - exception-handlinghow to remove SuppressWarnings ("unchecked") - javaJQuery tablesorter plugin not working after AJAX call - jqueryLINQ Generic SUM - VB.NET - vb.netIn RoR, if I say that A has_one B, does A necessarily have one B? - ruby-on-railsregex: replace match with index - stringWhere should Exclusions be excluded? - designHow to specify types for Haskell set builder notation? - listHow to solve the problem with the base tag? - javascriptAll Articles