Sha256: 71a2bf657c15c59a2a78ea70b6313b56461ac40fe42367ad346708dab1de35ae

Contents?: true

Size: 490 Bytes

Versions: 31

Compression:

Stored size: 490 Bytes

Contents

module Maestrano::Connector::Rails
  class AllSynchronizationsJob < ::ActiveJob::Base
    queue_as :default

    # Trigger synchronization of all active organizations
    def perform(name = nil, count = nil)
      Maestrano::Connector::Rails::Organization.where.not(oauth_provider: nil, encrypted_oauth_token: nil).each do |o|
        next unless [true, 1].include?(o.sync_enabled)
        Maestrano::Connector::Rails::SynchronizationJob.perform_later(o.id, {})
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
maestrano-connector-rails-2.0.2.pre.RC1 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.1 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0.pre.RC13 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0.pre.RC12 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0.pre.RC11 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0.pre.RC10 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0.pre.RC9 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0.pre.RC8 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-1.5.0 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0.pre.RC7 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb