c6c05085ad
Added worker process to call the phantomjs script in app/workers Added hook in models/map.rb to call the worker Added calls to map.touch in mappings_controller.rb so it would get triggered correctly - I'm not sure how this will proceed moving forward
10 lines
236 B
Ruby
10 lines
236 B
Ruby
# app/workers/grab_map_screenshot_worker.rb
|
|
class GrabMapScreenshotWorker
|
|
include Sidekiq::Worker
|
|
|
|
def perform(map_id)
|
|
Phantomjs.run('./script/phantomjs-save-screenshot.js', map_id.to_s) { |line|
|
|
puts line
|
|
}
|
|
end
|
|
end
|