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.11.1 lib/souls/app/graphql/souls_query.rb
souls-1.11.0 lib/souls/app/graphql/souls_query.rb
souls-1.10.8 lib/souls/app/graphql/souls_query.rb
souls-1.10.7 lib/souls/app/graphql/souls_query.rb
souls-1.10.6 lib/souls/app/graphql/souls_query.rb
souls-1.10.5 lib/souls/app/graphql/souls_query.rb
souls-1.10.4 lib/souls/app/graphql/souls_query.rb
souls-1.10.3 lib/souls/app/graphql/souls_query.rb
souls-1.10.2 lib/souls/app/graphql/souls_query.rb
souls-1.10.1 lib/souls/app/graphql/souls_query.rb
souls-1.10.0 lib/souls/app/graphql/souls_query.rb
souls-1.9.17 lib/souls/app/graphql/souls_query.rb
souls-1.9.16 lib/souls/app/graphql/souls_query.rb
souls-1.9.15 lib/souls/app/graphql/souls_query.rb
souls-1.9.14 lib/souls/app/graphql/souls_query.rb
souls-1.9.12 lib/souls/app/graphql/souls_query.rb
souls-1.9.11 lib/souls/app/graphql/souls_query.rb
souls-1.9.10 lib/souls/app/graphql/souls_query.rb
souls-1.9.9 lib/souls/app/graphql/souls_query.rb
souls-1.9.8 lib/souls/app/graphql/souls_query.rb