Sha256: 29598707cfc10cae8c3f901270b28379255f0f3f73511bd12cf1dcfc73aa6d91

Contents?: true

Size: 487 Bytes

Versions: 15

Compression:

Stored size: 487 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, {})
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
maestrano-connector-rails-2.0.0.pre.RC6 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0.pre.RC5 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0.pre.RC4 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0.pre.RC3 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0.pre.RC2 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-2.0.0.pre.RC1 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-1.4.0 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-1.3.5 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-1.3.4 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-1.3.3 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-1.3.2 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-1.3.1 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-1.3.0 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-1.2.3 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb
maestrano-connector-rails-1.2.2 app/jobs/maestrano/connector/rails/all_synchronizations_job.rb