Sha256: 6f2e4b799f3f2c93750384ae832a17b332e2b0a8f1b75533e287c789a75d75d4

Contents?: true

Size: 370 Bytes

Versions: 7

Compression:

Stored size: 370 Bytes

Contents

module DiscoApp::Concerns::SynchroniseUsersJob

  extend ActiveSupport::Concern

  def perform(_shop)
    begin
      users = @shop.with_api_context do
        ShopifyAPI::User.all
      end
    rescue ActiveResource::UnauthorizedAccess => e
      Appsignal.set_error(e)
      return
    end

    users.each { |user| DiscoApp::User.create_user(user, @shop) }
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
disco_app-0.17.0 app/jobs/disco_app/concerns/synchronise_users_job.rb
disco_app-0.18.0 app/jobs/disco_app/concerns/synchronise_users_job.rb
disco_app-0.18.2 app/jobs/disco_app/concerns/synchronise_users_job.rb
disco_app-0.18.3 app/jobs/disco_app/concerns/synchronise_users_job.rb
disco_app-0.18.6 app/jobs/disco_app/concerns/synchronise_users_job.rb
disco_app-0.18.4 app/jobs/disco_app/concerns/synchronise_users_job.rb
disco_app-0.18.1 app/jobs/disco_app/concerns/synchronise_users_job.rb