Module: DiscoApp::Concerns::SynchroniseUsersJob
- Extended by:
- ActiveSupport::Concern
- Included in:
- SynchroniseUsersJob
- Defined in:
- app/jobs/disco_app/concerns/synchronise_users_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(_shop) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'app/jobs/disco_app/concerns/synchronise_users_job.rb', line 4 def perform(_shop) begin users = @shop.with_api_context { ShopifyAPI::User.all } rescue ActiveResource::UnauthorizedAccess => e Rollbar.error(e) and return end users.each { |user| DiscoApp::User.create_user(user, @shop) } end |