Module: Kraps

Defined in:
lib/kraps.rb,
lib/kraps/job.rb,
lib/kraps/step.rb,
lib/kraps/frame.rb,
lib/kraps/runner.rb,
lib/kraps/worker.rb,
lib/kraps/actions.rb,
lib/kraps/drivers.rb,
lib/kraps/version.rb,
lib/kraps/interval.rb,
lib/kraps/temp_path.rb,
lib/kraps/downloader.rb,
lib/kraps/temp_paths.rb,
lib/kraps/redis_queue.rb,
lib/kraps/job_resolver.rb,
lib/kraps/parallelizer.rb,
lib/kraps/timeout_queue.rb,
lib/kraps/hash_partitioner.rb

Defined Under Namespace

Modules: Actions, Drivers Classes: Downloader, Error, Frame, HashPartitioner, IncompatibleFrame, Interval, InvalidAction, InvalidStep, Job, JobResolver, JobStopped, Parallelizer, RedisQueue, Runner, Step, TempPaths, TimeoutQueue, Worker

Constant Summary collapse

VERSION =
"0.10.0"
TempPath =
MapReduce::TempPath

Class Method Summary collapse

Class Method Details

.configure(driver:, redis: Redis.new, namespace: nil, job_ttl: 4 * 24 * 60 * 60, show_progress: true, enqueuer: ->(worker, json) { worker.perform_async(json) }) ⇒ Object



31
32
33
34
35
36
37
38
# File 'lib/kraps.rb', line 31

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

.driverObject



40
41
42
# File 'lib/kraps.rb', line 40

def self.driver
  @driver
end

.enqueuerObject



60
61
62
# File 'lib/kraps.rb', line 60

def self.enqueuer
  @enqueuer
end

.job_ttlObject



52
53
54
# File 'lib/kraps.rb', line 52

def self.job_ttl
  @job_ttl
end

.namespaceObject



48
49
50
# File 'lib/kraps.rb', line 48

def self.namespace
  @namespace
end

.redisObject



44
45
46
# File 'lib/kraps.rb', line 44

def self.redis
  @redis
end

.show_progress?Boolean

Returns:

  • (Boolean)


56
57
58
# File 'lib/kraps.rb', line 56

def self.show_progress?
  @show_progress
end