Sha256: a846f41bce71ed3280284dfa59d7d9370431eec6d727a9a21d64b1a36f278898

Contents?: true

Size: 1.26 KB

Versions: 2

Compression:

Stored size: 1.26 KB

Contents

require_relative "kraps/version"
require_relative "kraps/drivers"
require_relative "kraps/actions"
require_relative "kraps/parallelizer"
require_relative "kraps/temp_path"
require_relative "kraps/temp_paths"
require_relative "kraps/timeout_queue"
require_relative "kraps/interval"
require_relative "kraps/job"
require_relative "kraps/runner"
require_relative "kraps/step"
require_relative "kraps/frame"
require_relative "kraps/worker"
require "distributed_job"
require "ruby-progressbar"
require "ruby-progressbar/outputs/null"
require "map_reduce"
require "redis"

module Kraps
  class Error < StandardError; end
  class InvalidAction < Error; end
  class InvalidStep < Error; end
  class JobStopped < Error; end

  def self.configure(driver:, redis: Redis.new, namespace: nil, job_ttl: 24 * 60 * 60, show_progress: true, enqueuer: ->(worker, json) { worker.perform_async(json) })
    @driver = driver
    @distributed_job_client = DistributedJob::Client.new(redis: redis, namespace: namespace, default_ttl: job_ttl)
    @show_progress = show_progress
    @enqueuer = enqueuer
  end

  def self.driver
    @driver
  end

  def self.distributed_job_client
    @distributed_job_client
  end

  def self.show_progress?
    @show_progress
  end

  def self.enqueuer
    @enqueuer
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kraps-0.2.0 lib/kraps.rb
kraps-0.1.0 lib/kraps.rb