简体   繁体   中英

What is the best way to geocode large sets as a background process in Ruby on Rails?

I am implementing a contact importer and will be geocoding the contacts that are imported. If a user imports 1000 contacts, geocoding is way too slow. Essentially I would like to start a background process to geocode the contacts after they are imported and somehow report the status to a log.

Does this sound like the best way to do this? If so, can I do this with some simple ruby/rails? I have the javan-whenever gem which is essentially a ruby API for CRON but I would rather this be an immediately spawned background process after importing.

还有延迟的工作

There are a couple of plugins that can help you do this:

  1. BackgroundDRb
  2. Spawn

Tony,您可能也想看看http://www.simpleworker.com ,它会负责所有处理管理和监视以及计划(如cron)(如果需要)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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