Sha256: d81b0f7f9290ef819383a14b9ae5b78ae0d48046ed2b02cc2b890855bce63820

Contents?: true

Size: 595 Bytes

Versions: 61

Compression:

Stored size: 595 Bytes

Contents

module Souls
  class SoulsQuery < GraphQL::Schema::Resolver
    @schedule = nil
    class << self
      attr_accessor :schedule
    end

    def self.cron(schedule)
      self.schedule = schedule
    end

    def self.all_schedules
      schedule_list = {}
      Queries.constants.select { |c| Queries.const_get(c).is_a?(Class) }
             .each do |clname|
        next if clname == :BaseQuery

        job_schedule = Queries.const_get(clname).schedule
        schedule_list[clname] = job_schedule unless job_schedule.nil?
      end
      schedule_list
    end
  end
end

module Queries
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
souls-1.13.7 lib/souls/app/graphql/souls_query.rb
souls-1.13.6 lib/souls/app/graphql/souls_query.rb
souls-1.13.5 lib/souls/app/graphql/souls_query.rb
souls-1.13.4 lib/souls/app/graphql/souls_query.rb
souls-1.13.3 lib/souls/app/graphql/souls_query.rb
souls-1.13.2 lib/souls/app/graphql/souls_query.rb
souls-1.13.1 lib/souls/app/graphql/souls_query.rb
souls-1.13.0 lib/souls/app/graphql/souls_query.rb
souls-1.12.5 lib/souls/app/graphql/souls_query.rb
souls-1.12.4 lib/souls/app/graphql/souls_query.rb
souls-1.12.3 lib/souls/app/graphql/souls_query.rb
souls-1.12.2 lib/souls/app/graphql/souls_query.rb
souls-1.12.1 lib/souls/app/graphql/souls_query.rb
souls-1.12.0 lib/souls/app/graphql/souls_query.rb
souls-1.11.7 lib/souls/app/graphql/souls_query.rb
souls-1.11.6 lib/souls/app/graphql/souls_query.rb
souls-1.11.5 lib/souls/app/graphql/souls_query.rb
souls-1.11.4 lib/souls/app/graphql/souls_query.rb
souls-1.11.3 lib/souls/app/graphql/souls_query.rb
souls-1.11.2 lib/souls/app/graphql/souls_query.rb