Sha256: 7cb8007a0ad8fb47e1ae2518453a105dbe02ff76a733601928d1aa6ff01c6321
Contents?: true
Size: 355 Bytes
Versions: 2
Compression:
Stored size: 355 Bytes
Contents
# This class implements a Sidekiq worker for performing geocoding # asynchronously. Do something like this in your controller: # # if @object.save # GeocoderWorker.perform_async(@object.id) # end # class GeocoderWorker include Sidekiq::Worker def perform(object_id) object = Object.find(object_id) object.geocode object.save! end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
geocoder-1.2.7 | examples/sidekiq_worker.rb |
geocoder-kb-1.2.6 | examples/sidekiq_worker.rb |