Skip to content

Instantly share code, notes, and snippets.

@kusumandaru
Created March 14, 2020 08:48
Show Gist options
  • Save kusumandaru/a3d2fc9ec0f83531dc512ff36ff6e0b3 to your computer and use it in GitHub Desktop.
Save kusumandaru/a3d2fc9ec0f83531dc512ff36ff6e0b3 to your computer and use it in GitHub Desktop.
module Bigquery
class UserStreamJob < ApplicationJob
queue_as :default
def perform(user_id)
user = User.find_by(id: user_id)
return if user.blank?
service = Bigquery::UserService.new
service.insert_rows(user)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment