Last active
January 12, 2018 16:32
-
-
Save ychaker/df44e3981150e2409f41277eb8ad7ee0 to your computer and use it in GitHub Desktop.
Rails: non blocking analytics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Analytics | |
class KeenEventJob < ::ActiveJob::Base | |
queue_as :analytics | |
def perform event, data | |
::Keen.publish event.to_sym, data | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment