moves storing of visits to queue

This commit is contained in:
rgarcia
2015-09-08 22:06:31 +02:00
parent 55b2f96062
commit cdc914de0d
2 changed files with 11 additions and 1 deletions

6
app/jobs/stats_job.rb Normal file
View File

@@ -0,0 +1,6 @@
class StatsJob < ActiveJob::Base
queue_as :default
def perform(*args)
end
end

View File

@@ -1,5 +1,9 @@
class Ahoy::Store < Ahoy::Stores::ActiveRecordStore
def track_visit(options)
StatsJob.perform_later(super)
end
# Track user IP
def track_event(name, properties, options)
super do |event|