module Vx::Worker

Constants

LogJob
RunScript
StartConnector
Timeout
UpdateJobStatus
VERSION

Public Instance Methods

config() click to toggle source
# File lib/vx/worker.rb, line 50
def config
  @config ||= begin
    @@config_mutex.synchronize do
      Configuration.new
    end
  end
end
configure() { |config| ... } click to toggle source
# File lib/vx/worker.rb, line 45
def configure
  yield config
  config
end
initialize!() click to toggle source
# File lib/vx/worker.rb, line 76
def initialize!
  root.join("lib/vx/worker/initializers").children.each do |e|
    require e
  end
end
logger() click to toggle source
# File lib/vx/worker.rb, line 37
def logger
  if ENV['CI_WORKER_SILENT']
    config.null_logger
  else
    config.logger
  end
end
perform(job, path_prefix) click to toggle source
# File lib/vx/worker.rb, line 62
def perform(job, path_prefix)
  rs = run_class.new(job, path_prefix).perform
  job.release
  rs
end
reset_config!() click to toggle source
# File lib/vx/worker.rb, line 72
def reset_config!
  @config = nil
end
root() click to toggle source
# File lib/vx/worker.rb, line 58
def root
  @@root
end
run_class() click to toggle source
# File lib/vx/worker.rb, line 68
def run_class
  self.const_get(config.run.to_s.camelize)
end